Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/krate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ pub fn index(req: &mut Request) -> CargoResult<Response> {
args.insert(0, query);
("SELECT crates.* FROM crates,
plainto_tsquery($1) q,
ts_rank_cd(textsearchable_index_col, q) rank
ts_rank_cd('{0.1, 0.3, 0.5, 1.0}', textsearchable_index_col, q) rank
WHERE q @@ textsearchable_index_col
ORDER BY rank DESC, crates.name ASC
LIMIT $2 OFFSET $3".to_string(),
Expand Down