Module org.elasticsearch.server
Class RareTermsAggregationBuilder
java.lang.Object
org.elasticsearch.search.aggregations.AggregationBuilder
org.elasticsearch.search.aggregations.AbstractAggregationBuilder<AB>
org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
org.elasticsearch.search.aggregations.bucket.terms.RareTermsAggregationBuilder
- All Implemented Interfaces:
- NamedWriteable,- VersionedNamedWriteable,- Writeable,- Rewriteable<AggregationBuilder>,- BaseAggregationBuilder,- ToXContent,- ToXContentFragment
public class RareTermsAggregationBuilder
extends ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- 
Nested Class SummaryNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilderValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<AB>>, ValuesSourceAggregationBuilder.MetricsAggregationBuilder<VS extends ValuesSource, AB extends ValuesSourceAggregationBuilder<AB>>, ValuesSourceAggregationBuilder.SingleMetricAggregationBuilder<VS extends ValuesSource, AB extends ValuesSourceAggregationBuilder<AB>> Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.AggregationBuilderAggregationBuilder.BucketCardinality, AggregationBuilder.CommonFieldsNested 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 SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final ObjectParser<RareTermsAggregationBuilder,String> static final ValuesSourceRegistry.RegistryKey<org.elasticsearch.search.aggregations.bucket.terms.RareTermsAggregatorSupplier>Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilderconfigFields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuildermetadataFields inherited from class org.elasticsearch.search.aggregations.AggregationBuilderDEFAULT_PREALLOCATION, factoriesBuilder, nameFields inherited from interface org.elasticsearch.index.query.RewriteableMAX_REWRITE_ROUNDSFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructorsConstructorDescriptionRead from a stream.
- 
Method SummaryModifier and TypeMethodDescriptionA rough count of the number of buckets thatAggregators built by this builder will contain per owning parent bucket.protected ValuesSourceTypeAggregations should use this method to define aValuesSourceTypeof last resort.protected XContentBuilderdoXContentBody(XContentBuilder builder, ToXContent.Params params) booleanThe minimal version of the recipient this object can be sent todoubleGet the current false positive rate for individual cuckoo filters.protected ValuesSourceRegistry.RegistryKey<?>getType()The name of the type of aggregation built by this builder.inthashCode()Get terms to include and exclude from the aggregation resultsincludeExclude(IncludeExclude includeExclude) Set terms to include and exclude from the aggregation resultsprotected ValuesSourceAggregatorFactoryinnerBuild(AggregationContext context, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) protected voidinnerWriteTo(StreamOutput out) Write subclass's state to the stream.maxDocCount(long maxDocCount) Set the maximum document count terms should have in order to appear in the response.static voidprotected booleanserializeTargetValueType(Version version) DO NOT OVERRIDE THIS!voidsetPrecision(double precision) Set's the false-positive rate for individual cuckoo filters.protected AggregationBuildershallowCopy(AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) Create a shallow copy of this builder and replacingAggregationBuilder.factoriesBuilderandmetadata.booleanDoes this aggregation support running with in a sampling context.Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilderdeclareFields, declareFields, doBuild, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, script, script, timeZone, timeZone, userValueTypeHint, userValueTypeHintMethods inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilderbuild, getMetadata, getWriteableName, setMetadata, subAggregation, subAggregation, subAggregations, toXContent, writeToMethods inherited from class org.elasticsearch.search.aggregations.AggregationBuilderbuildPipelineTree, bytesToPreallocate, doRewrite, getName, getOutputFieldNames, getPipelineAggregations, getSubAggregations, isInSortOrderExecutionRequired, rewrite, toString, validateSequentiallyOrdered, validateSequentiallyOrderedWithoutGapsMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragmentisFragment
- 
Field Details- 
NAME- See Also:
 
- 
REGISTRY_KEYpublic static final ValuesSourceRegistry.RegistryKey<org.elasticsearch.search.aggregations.bucket.terms.RareTermsAggregatorSupplier> REGISTRY_KEY
- 
PARSER
 
- 
- 
Constructor Details- 
RareTermsAggregationBuilder
- 
RareTermsAggregationBuilderRead from a stream.- Throws:
- IOException
 
 
- 
- 
Method Details- 
registerAggregators
- 
supportsSamplingpublic boolean supportsSampling()Description copied from class:AggregationBuilderDoes this aggregation support running with in a sampling context. By default, it's false for all aggregations. If the sub-classed builder supports sampling, be sure of the following that the resulting internal aggregation objects override theInternalAggregation.finalizeSampling(SamplingContext)and scales any values that require scaling.- Overrides:
- supportsSamplingin class- AggregationBuilder
- Returns:
- does this aggregation builder support sampling
 
- 
defaultValueSourceTypeDescription copied from class:ValuesSourceAggregationBuilderAggregations should use this method to define aValuesSourceTypeof last resort. This will only be used when the resolver can't find a field and the user hasn't provided a value type hint.- Specified by:
- defaultValueSourceTypein class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Returns:
- The CoreValuesSourceType we expect this script to yield.
 
- 
shallowCopyprotected AggregationBuilder shallowCopy(AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) Description copied from class:AggregationBuilderCreate a shallow copy of this builder and replacingAggregationBuilder.factoriesBuilderandmetadata. Used byAggregationBuilder.rewrite(QueryRewriteContext).- Specified by:
- shallowCopyin class- AggregationBuilder
 
- 
serializeTargetValueTypeDescription copied from class:ValuesSourceAggregationBuilderDO NOT OVERRIDE THIS!This method only exists for legacy support. No new aggregations need this, nor should they override it. - Overrides:
- serializeTargetValueTypein class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Parameters:
- version- For backwards compatibility, subclasses can change behavior based on the version
 
- 
innerWriteToDescription copied from class:ValuesSourceAggregationBuilderWrite subclass's state to the stream.- Specified by:
- innerWriteToin class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Throws:
- IOException
 
- 
maxDocCountSet the maximum document count terms should have in order to appear in the response.
- 
includeExcludeSet terms to include and exclude from the aggregation results
- 
includeExcludeGet terms to include and exclude from the aggregation results
- 
getPrecisionpublic double getPrecision()Get the current false positive rate for individual cuckoo filters.
- 
setPrecisionpublic void setPrecision(double precision) Set's the false-positive rate for individual cuckoo filters. Does not dictate the overall fpp rate since we use a "scaling" cuckoo filter which adds more filters as required, and the overall error rate grows differently than individual filters This value does, however, affect the overall space usage of the filter. Coarser precisions provide more compact filters. The default is 0.01
- 
bucketCardinalityDescription copied from class:AggregationBuilderA rough count of the number of buckets thatAggregators built by this builder will contain per owning parent bucket.- Specified by:
- bucketCardinalityin class- AggregationBuilder
 
- 
innerBuildprotected ValuesSourceAggregatorFactory innerBuild(AggregationContext context, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException - Specified by:
- innerBuildin class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Throws:
- IOException
 
- 
doXContentBodyprotected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
- doXContentBodyin class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Throws:
- IOException
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
 
- 
equals- Overrides:
- equalsin class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
 
- 
getTypeDescription copied from interface:BaseAggregationBuilderThe name of the type of aggregation built by this builder.
- 
getRegistryKey- Specified by:
- getRegistryKeyin class- ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
 
- 
getMinimalSupportedVersionDescription copied from interface:VersionedNamedWriteableThe minimal version of the recipient this object can be sent to
 
-