diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java index c5bc7caa718a0..70fbe30b0a558 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java +++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java @@ -433,7 +433,7 @@ public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCol LeafBucketCollector termDocFreqCollector = this.termDocFreqCollector( ctx, segmentOrds, - (ord, docCount) -> incrementBucketDocCount(collectionStrategy.globalOrdToBucketOrd(0, mapping.applyAsLong(ord)), docCount) + (ord, docCount) -> incrementBucketDocCount(mapping.applyAsLong(ord), docCount) ); if (termDocFreqCollector != null) { return termDocFreqCollector;