From 7279f2834467fbd9e59944ca14fbf7a7cfae8fd3 Mon Sep 17 00:00:00 2001 From: James Rodewig <40268737+jrodewig@users.noreply.github.com> Date: Mon, 25 Jan 2021 12:07:27 -0500 Subject: [PATCH] Fix segment typo in tophints aggregator (#67858) (#67927) Co-authored-by: Howard --- .../search/aggregations/metrics/TopHitsAggregator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/TopHitsAggregator.java b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/TopHitsAggregator.java index 4a2b980169c..8f064ad5c41 100644 --- a/server/src/main/java/org/elasticsearch/search/aggregations/metrics/TopHitsAggregator.java +++ b/server/src/main/java/org/elasticsearch/search/aggregations/metrics/TopHitsAggregator.java @@ -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 leafCollectors = new LongObjectHashMap<>(1); return new LeafBucketCollectorBase(sub, null) {