Module org.elasticsearch.server
Class InternalFilters
java.lang.Object
org.elasticsearch.search.aggregations.InternalAggregation
org.elasticsearch.search.aggregations.InternalMultiBucketAggregation<InternalFilters,InternalFilters.InternalBucket>
 
org.elasticsearch.search.aggregations.bucket.filter.InternalFilters
- All Implemented Interfaces:
- NamedWriteable,- Writeable,- Aggregation,- Filters,- MultiBucketsAggregation,- ToXContent,- ToXContentFragment
public class InternalFilters
extends InternalMultiBucketAggregation<InternalFilters,InternalFilters.InternalBucket>
implements Filters 
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.AggregationAggregation.CommonFieldsNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.bucket.filter.FiltersFilters.BucketNested classes/interfaces inherited from interface org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregationMultiBucketsAggregation.BucketNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFields inherited from class org.elasticsearch.search.aggregations.InternalAggregationmetadata, nameFields inherited from interface org.elasticsearch.search.aggregations.AggregationTYPED_KEYS_DELIMITERFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructorsConstructorDescriptionInternalFilters(String name, List<InternalFilters.InternalBucket> buckets, boolean keyed, Map<String, Object> metadata) Read from a stream.
- 
Method SummaryModifier and TypeMethodDescriptioncreate(List<InternalFilters.InternalBucket> buckets) Create a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.createBucket(InternalAggregations aggregations, InternalFilters.InternalBucket prototype) Create a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.protected voiddoWriteTo(StreamOutput out) doXContentBody(XContentBuilder builder, ToXContent.Params params) booleanfinalizeSampling(SamplingContext samplingContext) Called by the parent sampling context.getBucketByKey(String key) The buckets created by this aggregation.Returns the name of the writeable objectinthashCode()reduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) Reduces the given aggregations to a single one and returns it.protected InternalFilters.InternalBucketreduceBucket(List<InternalFilters.InternalBucket> buckets, AggregationReduceContext context) Reduce a list of same-keyed buckets (from multiple shards) to a single bucket.Methods inherited from class org.elasticsearch.search.aggregations.InternalMultiBucketAggregationcopyWithRewritenBuckets, countInnerBucket, countInnerBucket, forEachBucket, getProperty, mustReduceOnSingleInternalAgg, reducePipelinesMethods inherited from class org.elasticsearch.search.aggregations.InternalAggregationgetMetadata, getName, getProperty, getType, isMapped, readSize, sortValue, sortValue, toString, toXContent, writeSize, writeToMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.search.aggregations.AggregationgetMetadata, getName, getTypeMethods inherited from interface org.elasticsearch.xcontent.ToXContenttoXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragmentisFragment
- 
Constructor Details- 
InternalFilters
- 
InternalFiltersRead from a stream.- Throws:
- IOException
 
 
- 
- 
Method Details- 
doWriteTo- Specified by:
- doWriteToin class- InternalAggregation
- Throws:
- IOException
 
- 
getWriteableNameDescription copied from interface:NamedWriteableReturns the name of the writeable object- Specified by:
- getWriteableNamein interface- NamedWriteable
 
- 
createDescription copied from class:InternalMultiBucketAggregationCreate a new copy of thisAggregationwith the same settings as thisAggregationand contains the provided buckets.- Specified by:
- createin class- InternalMultiBucketAggregation<InternalFilters,- InternalFilters.InternalBucket> 
- Parameters:
- buckets- the buckets to use in the new- Aggregation
- Returns:
- the new Aggregation
 
- 
createBucketpublic InternalFilters.InternalBucket createBucket(InternalAggregations aggregations, InternalFilters.InternalBucket prototype) Description copied from class:InternalMultiBucketAggregationCreate a newInternalMultiBucketAggregation.InternalBucketusing the provided prototype bucket and aggregations.- Specified by:
- createBucketin class- InternalMultiBucketAggregation<InternalFilters,- InternalFilters.InternalBucket> 
- Parameters:
- aggregations- the aggregations for the new bucket
- prototype- the bucket to use as a prototype
- Returns:
- the new bucket
 
- 
getBucketsDescription copied from interface:FiltersThe buckets created by this aggregation.- Specified by:
- getBucketsin interface- Filters
- Specified by:
- getBucketsin interface- MultiBucketsAggregation
- Specified by:
- getBucketsin class- InternalMultiBucketAggregation<InternalFilters,- InternalFilters.InternalBucket> 
- Returns:
- The buckets of this aggregation.
 
- 
getBucketByKey- Specified by:
- getBucketByKeyin interface- Filters
 
- 
reducepublic InternalAggregation reduce(List<InternalAggregation> aggregations, AggregationReduceContext reduceContext) Description copied from class:InternalAggregationReduces the given aggregations to a single one and returns it. In most cases, the assumption will be the all given aggregations are of the same type (the same type as this aggregation). For best efficiency, when implementing, try reusing an existing instance (typically the first in the given list) to save on redundant object construction.- Specified by:
- reducein class- InternalAggregation
- See Also:
 
- 
finalizeSamplingDescription copied from class:InternalAggregationCalled by the parent sampling context. Should only ever be called once as some aggregations scale their internal values- Overrides:
- finalizeSamplingin class- InternalAggregation
- Parameters:
- samplingContext- the current sampling context
- Returns:
- new aggregation with the sampling context applied, could be the same aggregation instance if nothing needs to be done
 
- 
reduceBucketprotected InternalFilters.InternalBucket reduceBucket(List<InternalFilters.InternalBucket> buckets, AggregationReduceContext context) Description copied from class:InternalMultiBucketAggregationReduce a list of same-keyed buckets (from multiple shards) to a single bucket. This requires all buckets to have the same key.- Specified by:
- reduceBucketin class- InternalMultiBucketAggregation<InternalFilters,- InternalFilters.InternalBucket> 
 
- 
doXContentBodypublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
- doXContentBodyin class- InternalAggregation
- Throws:
- IOException
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- InternalAggregation
 
- 
equals- Overrides:
- equalsin class- InternalAggregation
 
 
-