Skip to content

Commit

Permalink
Fix the sort order of pages with exact matches
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Jun 29, 2022
1 parent dd7fc9d commit 72d7ec6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pagefind_web/src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl SearchIndex {
for page in word_index {
set.insert(page.page as usize);
}
unique_maps.push((word.len() - term.len(), set.clone()));
unique_maps.push((word.len() - term.len() + 1, set.clone()));
word_maps.push(set);
}
let mut word_maps = word_maps.drain(..);
Expand Down

0 comments on commit 72d7ec6

Please sign in to comment.