Class AggregateEsBase<A extends org.opensearch.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.opensearch.search.aggregations.Aggregation,B extends Bucket> extends AggregateBase<B>
Since:
6.0
  • Field Details

  • Constructor Details

  • Method Details

    • getEsAggregate

      public abstract org.opensearch.search.aggregations.AggregationBuilder getEsAggregate()
      Return the Elasticsearch aggregate builder
    • getEsFilter

      public abstract org.opensearch.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.
      Specified by:
      getField in interface Aggregate<A extends org.opensearch.search.aggregations.Aggregation>
      Overrides:
      getField in class AggregateBase<B extends Bucket>
    • 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 interface Aggregate<A extends org.opensearch.search.aggregations.Aggregation>
      Overrides:
      getXPathField in class AggregateBase<B extends Bucket>