diff --git a/server/src/main/java/org/opensearch/search/optimization/filterrewrite/CompositeAggregatorBridge.java b/server/src/main/java/org/opensearch/search/optimization/filterrewrite/CompositeAggregatorBridge.java index 86c695ea4dcdc..74fe30720b85d 100644 --- a/server/src/main/java/org/opensearch/search/optimization/filterrewrite/CompositeAggregatorBridge.java +++ b/server/src/main/java/org/opensearch/search/optimization/filterrewrite/CompositeAggregatorBridge.java @@ -55,7 +55,7 @@ public final void tryOptimize(PointValues values, BiConsumer increme try { incrementDocCount.accept(ord, (long) 1); - sub.collect(docID, activeIndex); + sub.collect(docID, ord); } catch ( IOException ioe) { throw new RuntimeException(ioe); } diff --git a/server/src/main/java/org/opensearch/search/optimization/filterrewrite/DateHistogramAggregatorBridge.java b/server/src/main/java/org/opensearch/search/optimization/filterrewrite/DateHistogramAggregatorBridge.java index ecba0ee0c3566..06d0e251a4105 100644 --- a/server/src/main/java/org/opensearch/search/optimization/filterrewrite/DateHistogramAggregatorBridge.java +++ b/server/src/main/java/org/opensearch/search/optimization/filterrewrite/DateHistogramAggregatorBridge.java @@ -136,7 +136,7 @@ public void tryOptimize(PointValues values, BiConsumer incrementDocC try { incrementDocCount.accept(ord, (long) 1); - sub.collect(docID, activeIndex); + sub.collect(docID, ord); } catch ( IOException ioe) { throw new RuntimeException(ioe); } diff --git a/server/src/main/java/org/opensearch/search/optimization/filterrewrite/RangeAggregatorBridge.java b/server/src/main/java/org/opensearch/search/optimization/filterrewrite/RangeAggregatorBridge.java index a6b456d6971bd..0c276891f345d 100644 --- a/server/src/main/java/org/opensearch/search/optimization/filterrewrite/RangeAggregatorBridge.java +++ b/server/src/main/java/org/opensearch/search/optimization/filterrewrite/RangeAggregatorBridge.java @@ -83,7 +83,7 @@ public final void tryOptimize(PointValues values, BiConsumer increme try { incrementDocCount.accept(ord, (long) 1); - sub.collect(docID, activeIndex); + sub.collect(docID, ord); } catch ( IOException ioe) { throw new RuntimeException(ioe); }