Skip to content

Commit

Permalink
add comment to BestBucketsDeferringCollector
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
  • Loading branch information
mch2 committed Jan 9, 2024
1 parent 0688dfa commit 0185041
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ static class Entry {
public BestBucketsDeferringCollector(SearchContext context, boolean isGlobal) {
this.searchContext = context;
this.isGlobal = isGlobal;
// a postCollection call is not made by the IndexSearcher when there are no segments.
// In this case init the collector as finished.
this.finished = context.searcher().getLeafContexts().isEmpty();
}

Expand Down

0 comments on commit 0185041

Please sign in to comment.