Skip to content

Commit

Permalink
Better ranking result
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino committed Apr 6, 2016
1 parent 71fec82 commit e90d046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/krate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ pub fn index(req: &mut Request) -> CargoResult<Response> {
plainto_tsquery($1) q,
ts_rank_cd(textsearchable_index_col, q) rank
WHERE q @@ textsearchable_index_col
ORDER BY rank DESC, crates.name ASC
ORDER BY name = $1 DESC, rank DESC, crates.name ASC
LIMIT $2 OFFSET $3".to_string(),
"SELECT COUNT(crates.*) FROM crates,
plainto_tsquery($1) q
Expand Down

0 comments on commit e90d046

Please sign in to comment.