Skip to content

Commit

Permalink
cheat-sheet: fix negative boost for removed icons
Browse files Browse the repository at this point in the history
  • Loading branch information
rszyma committed May 30, 2023
1 parent 9d09f38 commit 09ad62b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cheat-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,11 @@ document.addEventListener('DOMContentLoaded', function () {
{
prefix: true,
combineWith: "AND",
boostDocument: ((documentId, term, storedFields) => {
return storedFields.isRemoved ? 0.001 : 1
}),
}
);
remainingSearchResults.sort((a, b) => {
if (a.isRemoved != b.isRemoved) {
return a.isRemoved > b.isRemoved
}
return a.id > b.id
})

console.log(`search: ${remainingSearchResults.length} results found`);
elementGlyphCheatSheet.replaceChildren([]);
Expand Down

0 comments on commit 09ad62b

Please sign in to comment.