Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8294109: JavaDoc search should search whole index
Reviewed-by: jjg
  • Loading branch information
hns committed Nov 4, 2022
1 parent 5622b09 commit f9c7cda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -43,7 +43,7 @@ const categories = {
};
const highlight = "<span class='result-highlight'>$&</span>";
const NO_MATCH = {};
const MAX_RESULTS = 500;
const MAX_RESULTS = 300;
function checkUnnamed(name, separator) {
return name === "<Unnamed>" || !name ? "" : name + separator;
}
Expand Down Expand Up @@ -300,11 +300,11 @@ function doSearch(request, response) {
}
matches.push(m);
}
return matches.length < maxResults;
return true;
});
return matches.sort(function(e1, e2) {
return e2.score - e1.score;
});
}).slice(0, maxResults);
}

var result = searchIndex(moduleSearchIndex, "modules")
Expand Down
Expand Up @@ -86,6 +86,9 @@ var $ = function(f) {
click: function() {
return this;
},
hover: function() {
return this;
},
catcomplete: function(o) {
o.close = function() {};
search = function(term) {
Expand Down

1 comment on commit f9c7cda

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.