-
Bug
-
Resolution: Fixed
-
P4
-
17, 18, 19
-
b23
JavaDoc search limits search result to a certain number per category and that number varies between the in-page popup search and the standalone search page. For the popup search the maximum number of results per category is 500 whereas for the standalone search page it is 1000.
The problem is that the search script stops searching the index once it reaches the maximum number of results, which means that top matches further down the index may be lost in favor of lower quality matches earlier in the index.
The proper way to do this is to always search the whole index, sort results by match quality and only then truncate the result list to the number of results to show.
Fortunately, searching the index is a very fast operation, the slow part being rendering the results. Therefore the performance impact of always searching the whole index should be neglectable.
The problem is that the search script stops searching the index once it reaches the maximum number of results, which means that top matches further down the index may be lost in favor of lower quality matches earlier in the index.
The proper way to do this is to always search the whole index, sort results by match quality and only then truncate the result list to the number of results to show.
Fortunately, searching the index is a very fast operation, the slow part being rendering the results. Therefore the performance impact of always searching the whole index should be neglectable.