Skip to content

Commit

Permalink
chore: limit search result count
Browse files Browse the repository at this point in the history
  • Loading branch information
rootsongjc committed Jul 18, 2024
1 parent adafd4b commit 8849d97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/wowchemy-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ function initSearch(force, fuse) {
// Perform search.
function searchAcademic(query, fuse) {
let results = fuse.search(query);
// console.log({"results": results});
// Limit results to 100
results = results.slice(0, 100); // Add this line to limit results to 100

if (results.length > 0) {
$('#search-hits').append('<h3 class="mt-0">' + results.length + ' ' + i18n.results + '</h3>');
Expand Down

0 comments on commit 8849d97

Please sign in to comment.