Class ElasticsearchCompositeAggregationScroller
java.lang.Object
io.camunda.optimize.service.db.es.ElasticsearchCompositeAggregationScroller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanConsumes next page of the composite aggregation.create()setCompositeBucketConsumer(Consumer<co.elastic.clients.elasticsearch._types.aggregations.CompositeBucket> compositeBucketConsumer) setEsClient(OptimizeElasticsearchClient esClient) setFunction(Function<Map<String, co.elastic.clients.elasticsearch._types.FieldValue>, co.elastic.clients.elasticsearch.core.SearchRequest> generateSR) setPathToAggregation(String... pathToAggregation) In order to be able to access the composite aggregation the scroller needs to know where to find the composite aggregation.setSearchRequest(co.elastic.clients.elasticsearch.core.SearchRequest searchRequest)
-
Constructor Details
-
ElasticsearchCompositeAggregationScroller
public ElasticsearchCompositeAggregationScroller()
-
-
Method Details
-
create
-
consumeAllPages
public void consumeAllPages() -
consumePage
public boolean consumePage()Consumes next page of the composite aggregation.- Returns:
trueif a page was present,falseelse
-
setSearchRequest
public ElasticsearchCompositeAggregationScroller setSearchRequest(co.elastic.clients.elasticsearch.core.SearchRequest searchRequest) -
setEsClient
-
setCompositeBucketConsumer
public ElasticsearchCompositeAggregationScroller setCompositeBucketConsumer(Consumer<co.elastic.clients.elasticsearch._types.aggregations.CompositeBucket> compositeBucketConsumer) -
setFunction
public ElasticsearchCompositeAggregationScroller setFunction(Function<Map<String, co.elastic.clients.elasticsearch._types.FieldValue>, co.elastic.clients.elasticsearch.core.SearchRequest> generateSR) -
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
-