From 993748ec412681b88246757f85cb3b6186bd7365 Mon Sep 17 00:00:00 2001 From: Harsha Vamsi Kalluri Date: Mon, 10 Feb 2025 09:59:30 -0800 Subject: [PATCH] Disable terms optimization Signed-off-by: Harsha Vamsi Kalluri --- .../GlobalOrdinalsStringTermsAggregator.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 5132cb9e38603..d7edde41a5170 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 @@ -221,15 +221,15 @@ boolean tryCollectFromTermFrequencies(LeafReaderContext ctx, SortedSetDocValues protected boolean tryPrecomputeAggregationForLeaf(LeafReaderContext ctx) throws IOException { SortedSetDocValues globalOrds = valuesSource.globalOrdinalsValues(ctx); - if (collectionStrategy instanceof DenseGlobalOrds - && this.resultStrategy instanceof StandardTermsResults - && subAggregators.length == 0) { - return tryCollectFromTermFrequencies( - ctx, - globalOrds, - (ord, docCount) -> incrementBucketDocCount(collectionStrategy.globalOrdToBucketOrd(0, ord), docCount) - ); - } + // if (collectionStrategy instanceof DenseGlobalOrds + // && this.resultStrategy instanceof StandardTermsResults + // && subAggregators.length == 0) { + // return tryCollectFromTermFrequencies( + // ctx, + // globalOrds, + // (ord, docCount) -> incrementBucketDocCount(collectionStrategy.globalOrdToBucketOrd(0, ord), docCount) + // ); + // } return false; }