mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
count collector does not throw stop collection
This commit is contained in:
parent
a4e4235d93
commit
370444cb75
@ -179,11 +179,7 @@ public class QueryPhase implements SearchPhase {
|
||||
|
||||
if (searchContext.searchType() == SearchType.COUNT) {
|
||||
CountCollector countCollector = new CountCollector();
|
||||
try {
|
||||
searchContext.searcher().search(query, countCollector);
|
||||
} catch (ScanCollector.StopCollectingException e) {
|
||||
// all is well
|
||||
}
|
||||
searchContext.searcher().search(query, countCollector);
|
||||
topDocs = countCollector.topDocs();
|
||||
} else if (searchContext.searchType() == SearchType.SCAN) {
|
||||
ScanCollector scanCollector = new ScanCollector(searchContext.from(), searchContext.size(), searchContext.trackScores());
|
||||
|
Loading…
x
Reference in New Issue
Block a user