Class FilterByFilterAggregator.AdapterBuilder<T>
java.lang.Object
org.elasticsearch.search.aggregations.bucket.filter.FilterByFilterAggregator.AdapterBuilder<T>
- Enclosing class:
- FilterByFilterAggregator
Builds
FilterByFilterAggregator
when the filters are valid and
it would be faster than a "native" aggregation implementation. The
interface is designed to allow easy construction of
AdaptingAggregator
.-
Constructor Summary
ConstructorsConstructorDescriptionAdapterBuilder
(String name, boolean keyed, String otherBucketKey, AggregationContext context, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
Subclasses should override this to adapt theFilterByFilterAggregator
into another sort of aggregator if required.final void
final T
build()
Build the the adapter ornull
if the this isn't a valid rewrite.
-
Constructor Details
-
AdapterBuilder
public AdapterBuilder(String name, boolean keyed, String otherBucketKey, AggregationContext context, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) throws IOException- Throws:
IOException
-
-
Method Details
-
adapt
protected abstract T adapt(CheckedFunction<AggregatorFactories, FilterByFilterAggregator, throws IOExceptionIOException> delegate) Subclasses should override this to adapt theFilterByFilterAggregator
into another sort of aggregator if required.- Throws:
IOException
-
add
- Throws:
IOException
-
build
Build the the adapter ornull
if the this isn't a valid rewrite.- Throws:
IOException
-