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
,Writeable
,Rewriteable<AggregationBuilder>
,BaseAggregationBuilder
,ToXContent
,ToXContentFragment
public class RareTermsAggregationBuilder
extends ValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
ValuesSourceAggregationBuilder.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.AggregationBuilder
AggregationBuilder.BucketCardinality, AggregationBuilder.CommonFields
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final ObjectParser<RareTermsAggregationBuilder,
String> static final ValuesSourceRegistry.RegistryKey<org.elasticsearch.search.aggregations.bucket.terms.RareTermsAggregatorSupplier>
Fields inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
config
Fields inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
metadata
Fields inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
DEFAULT_PREALLOCATION, factoriesBuilder, name
Fields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionRead from a stream. -
Method Summary
Modifier and TypeMethodDescriptionA rough count of the number of buckets thatAggregator
s built by this builder will contain per owning parent bucket.protected ValuesSourceType
Aggregations should use this method to define aValuesSourceType
of last resort.protected XContentBuilder
doXContentBody
(XContentBuilder builder, ToXContent.Params params) boolean
double
Get the current false positive rate for individual cuckoo filters.protected ValuesSourceRegistry.RegistryKey<?>
getType()
The name of the type of aggregation built by this builder.int
hashCode()
Get terms to include and exclude from the aggregation resultsincludeExclude
(IncludeExclude includeExclude) Set terms to include and exclude from the aggregation resultsprotected ValuesSourceAggregatorFactory
innerBuild
(AggregationContext context, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) protected void
innerWriteTo
(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 void
protected boolean
serializeTargetValueType
(Version version) DO NOT OVERRIDE THIS!void
setPrecision
(double precision) Set's the false-positive rate for individual cuckoo filters.protected AggregationBuilder
shallowCopy
(AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) Create a shallow copy of this builder and replacingAggregationBuilder.factoriesBuilder
andmetadata
.Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder
declareFields, declareFields, doBuild, doWriteTo, field, field, format, format, internalXContent, missing, missing, resolveConfig, script, script, timeZone, timeZone, userValueTypeHint, userValueTypeHint
Methods inherited from class org.elasticsearch.search.aggregations.AbstractAggregationBuilder
build, getMetadata, getWriteableName, setMetadata, subAggregation, subAggregation, subAggregations, toXContent, writeTo
Methods inherited from class org.elasticsearch.search.aggregations.AggregationBuilder
buildPipelineTree, bytesToPreallocate, doRewrite, getName, getOutputFieldNames, getPipelineAggregations, getSubAggregations, isInSortOrderExecutionRequired, rewrite, toString, validateSequentiallyOrdered, validateSequentiallyOrderedWithoutGaps
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
NAME
- See Also:
-
REGISTRY_KEY
public static final ValuesSourceRegistry.RegistryKey<org.elasticsearch.search.aggregations.bucket.terms.RareTermsAggregatorSupplier> REGISTRY_KEY -
PARSER
-
-
Constructor Details
-
RareTermsAggregationBuilder
-
RareTermsAggregationBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
registerAggregators
-
defaultValueSourceType
Description copied from class:ValuesSourceAggregationBuilder
Aggregations should use this method to define aValuesSourceType
of 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:
defaultValueSourceType
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Returns:
- The CoreValuesSourceType we expect this script to yield.
-
shallowCopy
protected AggregationBuilder shallowCopy(AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) Description copied from class:AggregationBuilder
Create a shallow copy of this builder and replacingAggregationBuilder.factoriesBuilder
andmetadata
. Used byAggregationBuilder.rewrite(QueryRewriteContext)
.- Specified by:
shallowCopy
in classAggregationBuilder
-
serializeTargetValueType
Description copied from class:ValuesSourceAggregationBuilder
DO NOT OVERRIDE THIS!This method only exists for legacy support. No new aggregations need this, nor should they override it.
- Overrides:
serializeTargetValueType
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Parameters:
version
- For backwards compatibility, subclasses can change behavior based on the version
-
innerWriteTo
Description copied from class:ValuesSourceAggregationBuilder
Write subclass's state to the stream.- Specified by:
innerWriteTo
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Throws:
IOException
-
maxDocCount
Set the maximum document count terms should have in order to appear in the response. -
includeExclude
Set terms to include and exclude from the aggregation results -
includeExclude
Get terms to include and exclude from the aggregation results -
getPrecision
public double getPrecision()Get the current false positive rate for individual cuckoo filters. -
setPrecision
public 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 -
bucketCardinality
Description copied from class:AggregationBuilder
A rough count of the number of buckets thatAggregator
s built by this builder will contain per owning parent bucket.- Specified by:
bucketCardinality
in classAggregationBuilder
-
innerBuild
protected ValuesSourceAggregatorFactory innerBuild(AggregationContext context, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException - Specified by:
innerBuild
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Throws:
IOException
-
doXContentBody
protected XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
doXContentBody
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
- Throws:
IOException
-
hashCode
public int hashCode()- Overrides:
hashCode
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
-
equals
- Overrides:
equals
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
-
getType
Description copied from interface:BaseAggregationBuilder
The name of the type of aggregation built by this builder. -
getRegistryKey
- Specified by:
getRegistryKey
in classValuesSourceAggregationBuilder<RareTermsAggregationBuilder>
-