Fix segment typo in tophints aggregator (#67858) (#67927)

Co-authored-by: Howard <danielhuang@tencent.com>
This commit is contained in:
James Rodewig 2021-01-25 12:07:27 -05:00 committed by GitHub
parent a01c57e9a1
commit 7279f28344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class TopHitsAggregator extends MetricsAggregator {
public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCollector sub) throws IOException {
// Create leaf collectors here instead of at the aggregator level. Otherwise in case this collector get invoked
// when post collecting then we have already replaced the leaf readers on the aggregator level have already been
// replaced with the next leaf readers and then post collection pushes docids of the previous segement, which
// replaced with the next leaf readers and then post collection pushes docids of the previous segment, which
// then causes assertions to trip or incorrect top docs to be computed.
final LongObjectHashMap<LeafCollector> leafCollectors = new LongObjectHashMap<>(1);
return new LeafBucketCollectorBase(sub, null) {