Class OpenSearchCompositeAggregationScroller
java.lang.Object
io.camunda.optimize.service.db.os.OpenSearchCompositeAggregationScroller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregations(Map<String, org.opensearch.client.opensearch._types.aggregations.Aggregation> aggregations) voidbooleanConsumes next page of the composite aggregation.create()query(org.opensearch.client.opensearch._types.query_dsl.Query query) setClient(OptimizeOpenSearchClient osClient) setCompositeBucketConsumer(Consumer<org.opensearch.client.opensearch._types.aggregations.CompositeBucket> compositeBucketConsumer) setPathToAggregation(String... pathToAggregation) In order to be able to access the composite aggregation the scroller needs to know where to find the composite aggregation.size(int size)
-
Constructor Details
-
OpenSearchCompositeAggregationScroller
public OpenSearchCompositeAggregationScroller()
-
-
Method Details
-
aggregations
public OpenSearchCompositeAggregationScroller aggregations(Map<String, org.opensearch.client.opensearch._types.aggregations.Aggregation> aggregations) -
query
public OpenSearchCompositeAggregationScroller query(org.opensearch.client.opensearch._types.query_dsl.Query query) -
index
-
size
-
create
-
consumeAllPages
public void consumeAllPages() -
consumePage
public boolean consumePage()Consumes next page of the composite aggregation.- Returns:
trueif a page was present,falseelse
-
setClient
-
setCompositeBucketConsumer
public OpenSearchCompositeAggregationScroller setCompositeBucketConsumer(Consumer<org.opensearch.client.opensearch._types.aggregations.CompositeBucket> compositeBucketConsumer) -
setPathToAggregation
In order to be able to access the composite aggregation the scroller needs to know where to find the composite aggregation. The path can be stated in this method:Example: Aggregation: nested("fooNested",..).subAggregation(composite("myComposite")..) Respective call: setPathToAggregation("fooNested", "myComposite")
- Parameters:
pathToAggregation- a path to where to find the composite aggregation- Returns:
- the scroller object
-