8294109: JavaDoc search should search whole index
Reviewed-by: jjg
This commit is contained in:
parent
5622b09565
commit
f9c7cdaed6
@ -43,7 +43,7 @@ const categories = {
|
|||||||
};
|
};
|
||||||
const highlight = "<span class='result-highlight'>$&</span>";
|
const highlight = "<span class='result-highlight'>$&</span>";
|
||||||
const NO_MATCH = {};
|
const NO_MATCH = {};
|
||||||
const MAX_RESULTS = 500;
|
const MAX_RESULTS = 300;
|
||||||
function checkUnnamed(name, separator) {
|
function checkUnnamed(name, separator) {
|
||||||
return name === "<Unnamed>" || !name ? "" : name + separator;
|
return name === "<Unnamed>" || !name ? "" : name + separator;
|
||||||
}
|
}
|
||||||
@ -300,11 +300,11 @@ function doSearch(request, response) {
|
|||||||
}
|
}
|
||||||
matches.push(m);
|
matches.push(m);
|
||||||
}
|
}
|
||||||
return matches.length < maxResults;
|
return true;
|
||||||
});
|
});
|
||||||
return matches.sort(function(e1, e2) {
|
return matches.sort(function(e1, e2) {
|
||||||
return e2.score - e1.score;
|
return e2.score - e1.score;
|
||||||
});
|
}).slice(0, maxResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = searchIndex(moduleSearchIndex, "modules")
|
var result = searchIndex(moduleSearchIndex, "modules")
|
||||||
|
@ -86,6 +86,9 @@ var $ = function(f) {
|
|||||||
click: function() {
|
click: function() {
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
hover: function() {
|
||||||
|
return this;
|
||||||
|
},
|
||||||
catcomplete: function(o) {
|
catcomplete: function(o) {
|
||||||
o.close = function() {};
|
o.close = function() {};
|
||||||
search = function(term) {
|
search = function(term) {
|
||||||
|
Loading…
Reference in New Issue
Block a user