Skip to content

Commit 76cc193

Browse files
committed
clean up
Signed-off-by: bowenlan-amzn <[email protected]>
1 parent 02f5c14 commit 76cc193

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

server/src/main/java/org/opensearch/search/aggregations/bucket/FastFilterRewriteHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public void setAggregationType(AggregationType aggregationType) {
272272
}
273273

274274
public boolean isRewriteable(final Object parent, final int subAggLength) {
275-
if (context.maxAggRewriteFilters() == 0) return false;
275+
// if (context.maxAggRewriteFilters() == 0) return false;
276276

277277
boolean rewriteable = aggregationType.isRewriteable(parent, subAggLength);
278278
logger.debug("Fast filter rewriteable: {} for shard {}", rewriteable, context.indexShard().shardId());

server/src/main/java/org/opensearch/search/aggregations/bucket/composite/CompositeAggregator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ final class CompositeAggregator extends BucketsAggregator {
171171
// bucketOrds is used for saving date histogram results
172172
bucketOrds = LongKeyedBucketOrds.build(context.bigArrays(), CardinalityUpperBound.ONE);
173173
preparedRounding = ((CompositeAggregationType) fastFilterContext.getAggregationType()).getRoundingPrepared();
174+
fastFilterContext.setFieldName(sourceConfigs[0].name());
174175
fastFilterContext.buildRanges();
175176
}
176177
}

server/src/main/java/org/opensearch/search/aggregations/bucket/histogram/AutoDateHistogramAggregator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ private AutoDateHistogramAggregator(
166166
)
167167
);
168168
if (fastFilterContext.isRewriteable(parent, subAggregators.length)) {
169+
fastFilterContext.setFieldName(valuesSourceConfig.fieldType().name());
169170
fastFilterContext.buildRanges();
170171
}
171172
}

server/src/test/java/org/opensearch/search/aggregations/bucket/histogram/DateHistogramAggregatorTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,6 @@ public void testNanosIntervalSecond() throws IOException {
822822
aggregation -> aggregation.calendarInterval(DateHistogramInterval.SECOND).field(AGGREGABLE_DATE).minDocCount(1L),
823823
histogram -> {
824824
List<? extends Histogram.Bucket> buckets = histogram.getBuckets();
825-
System.out.println(buckets);
826825
assertEquals(3, buckets.size());
827826

828827
Histogram.Bucket bucket = buckets.get(0);

0 commit comments

Comments
 (0)