Class NativeEsAggregate
java.lang.Object
org.nuxeo.ecm.platform.query.core.AggregateBase<B>
org.nuxeo.elasticsearch.aggregate.AggregateEsBase<org.opensearch.search.aggregations.Aggregation,Bucket>
org.nuxeo.elasticsearch.aggregate.NativeEsAggregate
public class NativeEsAggregate
extends AggregateEsBase<org.opensearch.search.aggregations.Aggregation,Bucket>
This class is intended for internal/advanced use. It supports any ElasticSearch aggregate builder as a constructor
parameter. However, it doesn't support Nuxeo page providers or the aggregation factory. The other aggregate classes
are the preferred approach.
- Since:
- 10.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.opensearch.search.aggregations.AggregationBuilderprotected final Consumer<org.opensearch.search.aggregations.Aggregation>Fields inherited from class org.nuxeo.elasticsearch.aggregate.AggregateEsBase
ES_MUTLI_LEVEL_SEP, MAX_AGG_SIZE, XPATH_SEPFields inherited from class org.nuxeo.ecm.platform.query.core.AggregateBase
bucketMap, buckets, definition, extendedBuckets, searchDocument, selection -
Constructor Summary
ConstructorsConstructorDescriptionNativeEsAggregate(AggregateDefinition definition, org.opensearch.search.aggregations.AggregationBuilder nativeAggregation, Consumer<org.opensearch.search.aggregations.Aggregation> parser) NativeEsAggregate(org.opensearch.search.aggregations.AggregationBuilder nativeAggregation, Consumer<org.opensearch.search.aggregations.Aggregation> parser) Construct the aggregate using an ElasticSearch aggregate builder and a parser that will consume the response. -
Method Summary
Modifier and TypeMethodDescriptionorg.opensearch.search.aggregations.AggregationBuilderReturn the Elasticsearch aggregate builderorg.opensearch.index.query.QueryBuilderReturn the Elasticsearch aggregate filter corresponding to the selectionprotected static AggregateDefinitionmakeDefinition(org.opensearch.search.aggregations.AggregationBuilder nativeAggregation) For backwards compatibility make an AggregateDefinition.voidparseAggregation(org.opensearch.search.aggregations.Aggregation aggregation) Extract the aggregation from the Elasticsearch responsetoString()Methods inherited from class org.nuxeo.elasticsearch.aggregate.AggregateEsBase
getAggSize, getField, getXPathFieldMethods inherited from class org.nuxeo.ecm.platform.query.core.AggregateBase
getBucket, getBucketMap, getBuckets, getDateRanges, getExtendedBuckets, getId, getProperties, getRanges, getSearchDocument, getSelection, getType, hasBucket, resetSelection, setBuckets, setSelection
-
Field Details
-
nativeAggregation
protected final org.opensearch.search.aggregations.AggregationBuilder nativeAggregation -
parser
-
-
Constructor Details
-
NativeEsAggregate
public NativeEsAggregate(AggregateDefinition definition, org.opensearch.search.aggregations.AggregationBuilder nativeAggregation, Consumer<org.opensearch.search.aggregations.Aggregation> parser) -
NativeEsAggregate
public NativeEsAggregate(org.opensearch.search.aggregations.AggregationBuilder nativeAggregation, Consumer<org.opensearch.search.aggregations.Aggregation> parser) Construct the aggregate using an ElasticSearch aggregate builder and a parser that will consume the response.
-
-
Method Details
-
makeDefinition
protected static AggregateDefinition makeDefinition(org.opensearch.search.aggregations.AggregationBuilder nativeAggregation) For backwards compatibility make an AggregateDefinition. -
getEsAggregate
public org.opensearch.search.aggregations.AggregationBuilder getEsAggregate()Description copied from class:AggregateEsBaseReturn the Elasticsearch aggregate builder- Specified by:
getEsAggregatein classAggregateEsBase<org.opensearch.search.aggregations.Aggregation,Bucket>
-
getEsFilter
public org.opensearch.index.query.QueryBuilder getEsFilter()Description copied from class:AggregateEsBaseReturn the Elasticsearch aggregate filter corresponding to the selection- Specified by:
getEsFilterin classAggregateEsBase<org.opensearch.search.aggregations.Aggregation,Bucket>
-
parseAggregation
public void parseAggregation(org.opensearch.search.aggregations.Aggregation aggregation) Description copied from class:AggregateEsBaseExtract the aggregation from the Elasticsearch response- Specified by:
parseAggregationin classAggregateEsBase<org.opensearch.search.aggregations.Aggregation,Bucket>
-
toString
- Overrides:
toStringin classAggregateBase<Bucket>
-