Class AggregateEsBase<A extends org.elasticsearch.search.aggregations.Aggregation,B extends Bucket>
- java.lang.Object
-
- org.nuxeo.ecm.platform.query.core.AggregateBase<B>
-
- org.nuxeo.elasticsearch.aggregate.AggregateEsBase<A,B>
-
- All Implemented Interfaces:
Aggregate<B>
- Direct Known Subclasses:
MultiBucketAggregate
,NativeEsAggregate
,SingleBucketAggregate
,SingleValueMetricAggregate
public abstract class AggregateEsBase<A extends org.elasticsearch.search.aggregations.Aggregation,B extends Bucket> extends AggregateBase<B>
- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description static char
ES_MUTLI_LEVEL_SEP
static int
MAX_AGG_SIZE
static char
XPATH_SEP
-
Fields inherited from class org.nuxeo.ecm.platform.query.core.AggregateBase
bucketMap, buckets, definition, extendedBuckets, searchDocument, selection
-
-
Constructor Summary
Constructors Constructor Description AggregateEsBase(AggregateDefinition definition, DocumentModel searchDocument)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
getAggSize(String prop)
abstract org.elasticsearch.search.aggregations.AggregationBuilder
getEsAggregate()
Return the Elasticsearch aggregate builderabstract org.elasticsearch.index.query.QueryBuilder
getEsFilter()
Return the Elasticsearch aggregate filter corresponding to the selectionString
getField()
Nuxeo field to aggregate.String
getXPathField()
Gets the field name as defined in Nuxeo.abstract void
parseAggregation(A aggregation)
Extract the aggregation from the Elasticsearch response-
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
-
XPATH_SEP
public static final char XPATH_SEP
- See Also:
- Constant Field Values
-
ES_MUTLI_LEVEL_SEP
public static final char ES_MUTLI_LEVEL_SEP
- See Also:
- Constant Field Values
-
MAX_AGG_SIZE
public static final int MAX_AGG_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AggregateEsBase
public AggregateEsBase(AggregateDefinition definition, DocumentModel searchDocument)
-
-
Method Detail
-
getEsAggregate
public abstract org.elasticsearch.search.aggregations.AggregationBuilder getEsAggregate()
Return the Elasticsearch aggregate builder
-
getEsFilter
public abstract org.elasticsearch.index.query.QueryBuilder getEsFilter()
Return the Elasticsearch aggregate filter corresponding to the selection
-
parseAggregation
public abstract void parseAggregation(A aggregation)
Extract the aggregation from the Elasticsearch response- Since:
- 10.3
-
getField
public String getField()
Description copied from interface:Aggregate
Nuxeo field to aggregate.
-
getAggSize
protected int getAggSize(String prop)
-
getXPathField
public String getXPathField()
Description copied from interface:Aggregate
Gets the field name as defined in Nuxeo.In Nuxeo the separator for a complex type is the `/` character, in a case where our
Aggregate
implementation defines a field as `file:content.mime-type`, this method should return `file:content/mime-type`.- Specified by:
getXPathField
in interfaceAggregate<A extends org.elasticsearch.search.aggregations.Aggregation>
- Overrides:
getXPathField
in classAggregateBase<B extends Bucket>
-
-