Class SingleValueMetricAggregate
- java.lang.Object
-
- org.nuxeo.ecm.platform.query.core.AggregateBase<B>
-
- org.nuxeo.elasticsearch.aggregate.AggregateEsBase<org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation.SingleValue,BucketTerm>
-
- org.nuxeo.elasticsearch.aggregate.SingleValueMetricAggregate
-
- All Implemented Interfaces:
Aggregate<BucketTerm>
public class SingleValueMetricAggregate extends AggregateEsBase<org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation.SingleValue,BucketTerm>
An aggregate that returns a single value.- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected org.elasticsearch.search.aggregations.AggregationBuilder
aggregationBuilder
protected Double
value
-
Fields inherited from class org.nuxeo.elasticsearch.aggregate.AggregateEsBase
ES_MUTLI_LEVEL_SEP, MAX_AGG_SIZE, XPATH_SEP
-
Fields inherited from class org.nuxeo.ecm.platform.query.core.AggregateBase
bucketMap, buckets, definition, extendedBuckets, searchDocument, selection
-
-
Constructor Summary
Constructors Constructor Description SingleValueMetricAggregate(AggregateDefinition definition, DocumentModel searchDocument)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.elasticsearch.search.aggregations.AggregationBuilder
getEsAggregate()
Return the Elasticsearch aggregate builderorg.elasticsearch.index.query.QueryBuilder
getEsFilter()
Return the Elasticsearch aggregate filter corresponding to the selectionDouble
getValue()
void
parseAggregation(org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation.SingleValue aggregation)
Extract the aggregation from the Elasticsearch responseorg.elasticsearch.search.aggregations.AggregationBuilder
toBuilder(String type)
Creates an AggregationBuilder for the supplied type-
Methods inherited from class org.nuxeo.elasticsearch.aggregate.AggregateEsBase
getAggSize, getField, getXPathField
-
Methods 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, toString
-
-
-
-
Field Detail
-
aggregationBuilder
protected final org.elasticsearch.search.aggregations.AggregationBuilder aggregationBuilder
-
-
Constructor Detail
-
SingleValueMetricAggregate
public SingleValueMetricAggregate(AggregateDefinition definition, DocumentModel searchDocument)
-
-
Method Detail
-
toBuilder
public org.elasticsearch.search.aggregations.AggregationBuilder toBuilder(String type)
Creates an AggregationBuilder for the supplied type
-
getEsAggregate
public org.elasticsearch.search.aggregations.AggregationBuilder getEsAggregate()
Description copied from class:AggregateEsBase
Return the Elasticsearch aggregate builder- Specified by:
getEsAggregate
in classAggregateEsBase<org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation.SingleValue,BucketTerm>
-
getEsFilter
public org.elasticsearch.index.query.QueryBuilder getEsFilter()
Description copied from class:AggregateEsBase
Return the Elasticsearch aggregate filter corresponding to the selection- Specified by:
getEsFilter
in classAggregateEsBase<org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation.SingleValue,BucketTerm>
-
parseAggregation
public void parseAggregation(org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation.SingleValue aggregation)
Description copied from class:AggregateEsBase
Extract the aggregation from the Elasticsearch response- Specified by:
parseAggregation
in classAggregateEsBase<org.elasticsearch.search.aggregations.metrics.NumericMetricsAggregation.SingleValue,BucketTerm>
-
-