Class SignificantTermsAggregation.Builder
- All Implemented Interfaces:
WithJson<SignificantTermsAggregation.Builder>,ObjectBuilder<SignificantTermsAggregation>
- Enclosing class:
- SignificantTermsAggregation
SignificantTermsAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackgroundFilter(Query value) A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.backgroundFilter(QueryVariant value) A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.build()Builds aSignificantTermsAggregation.chiSquare(ChiSquareHeuristic value) Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score.Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score.exclude(TermsExclude value) Terms to exclude.Terms to exclude.Mechanism by which the aggregation should be executed: using field values directly or using global ordinals.The field from which to return significant terms.Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score.gnd(Function<GoogleNormalizedDistanceHeuristic.Builder, ObjectBuilder<GoogleNormalizedDistanceHeuristic>> fn) Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score.include(TermsInclude value) Terms to include.Terms to include.jlh(EmptyObject value) Use JLH score as the significance score.Use JLH score as the significance score.minDocCount(Long value) Only return terms that are found in more thanmin_doc_counthits.Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score.mutualInformation(Function<MutualInformationHeuristic.Builder, ObjectBuilder<MutualInformationHeuristic>> fn) Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score.A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.pValue(PValueHeuristic value) Significant terms heuristic that calculates the p-value between the term existing in foreground and background sets.Significant terms heuristic that calculates the p-value between the term existing in foreground and background sets.scriptHeuristic(ScriptedHeuristic value) Customized score, implemented via a script.Customized score, implemented via a script.protected SignificantTermsAggregation.Builderself()shardMinDocCount(Long value) Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to themin_doc_count.Can be used to control the volumes of candidate terms produced by each shard.The number of buckets returned out of the overall terms list.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
backgroundFilter
A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.API name:
background_filter -
backgroundFilter
public final SignificantTermsAggregation.Builder backgroundFilter(Function<Query.Builder, ObjectBuilder<Query>> fn) A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.API name:
background_filter -
backgroundFilter
A background filter that can be used to focus in on significant terms within a narrower context, instead of the entire index.API name:
background_filter -
chiSquare
Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score.API name:
chi_square -
chiSquare
public final SignificantTermsAggregation.Builder chiSquare(Function<ChiSquareHeuristic.Builder, ObjectBuilder<ChiSquareHeuristic>> fn) Use Chi square, as described in "Information Retrieval", Manning et al., Chapter 13.5.2, as the significance score.API name:
chi_square -
exclude
Terms to exclude.API name:
exclude -
exclude
public final SignificantTermsAggregation.Builder exclude(Function<TermsExclude.Builder, ObjectBuilder<TermsExclude>> fn) Terms to exclude.API name:
exclude -
executionHint
public final SignificantTermsAggregation.Builder executionHint(@Nullable TermsAggregationExecutionHint value) Mechanism by which the aggregation should be executed: using field values directly or using global ordinals.API name:
execution_hint -
field
The field from which to return significant terms.API name:
field -
gnd
public final SignificantTermsAggregation.Builder gnd(@Nullable GoogleNormalizedDistanceHeuristic value) Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score.API name:
gnd -
gnd
public final SignificantTermsAggregation.Builder gnd(Function<GoogleNormalizedDistanceHeuristic.Builder, ObjectBuilder<GoogleNormalizedDistanceHeuristic>> fn) Use Google normalized distance as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007, as the significance score.API name:
gnd -
include
Terms to include.API name:
include -
include
public final SignificantTermsAggregation.Builder include(Function<TermsInclude.Builder, ObjectBuilder<TermsInclude>> fn) Terms to include.API name:
include -
jlh
Use JLH score as the significance score.API name:
jlh -
jlh
public final SignificantTermsAggregation.Builder jlh(Function<EmptyObject.Builder, ObjectBuilder<EmptyObject>> fn) Use JLH score as the significance score.API name:
jlh -
minDocCount
Only return terms that are found in more thanmin_doc_counthits.API name:
min_doc_count -
mutualInformation
public final SignificantTermsAggregation.Builder mutualInformation(@Nullable MutualInformationHeuristic value) Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score.API name:
mutual_information -
mutualInformation
public final SignificantTermsAggregation.Builder mutualInformation(Function<MutualInformationHeuristic.Builder, ObjectBuilder<MutualInformationHeuristic>> fn) Use mutual information as described in "Information Retrieval", Manning et al., Chapter 13.5.1, as the significance score.API name:
mutual_information -
percentage
public final SignificantTermsAggregation.Builder percentage(@Nullable PercentageScoreHeuristic value) A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.API name:
percentage -
percentage
public final SignificantTermsAggregation.Builder percentage(Function<PercentageScoreHeuristic.Builder, ObjectBuilder<PercentageScoreHeuristic>> fn) A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term.API name:
percentage -
scriptHeuristic
Customized score, implemented via a script.API name:
script_heuristic -
scriptHeuristic
public final SignificantTermsAggregation.Builder scriptHeuristic(Function<ScriptedHeuristic.Builder, ObjectBuilder<ScriptedHeuristic>> fn) Customized score, implemented via a script.API name:
script_heuristic -
pValue
Significant terms heuristic that calculates the p-value between the term existing in foreground and background sets.The p-value is the probability of obtaining test results at least as extreme as the results actually observed, under the assumption that the null hypothesis is correct. The p-value is calculated assuming that the foreground set and the background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, with the null hypothesis that the probabilities are the same.
API name:
p_value -
pValue
public final SignificantTermsAggregation.Builder pValue(Function<PValueHeuristic.Builder, ObjectBuilder<PValueHeuristic>> fn) Significant terms heuristic that calculates the p-value between the term existing in foreground and background sets.The p-value is the probability of obtaining test results at least as extreme as the results actually observed, under the assumption that the null hypothesis is correct. The p-value is calculated assuming that the foreground set and the background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, with the null hypothesis that the probabilities are the same.
API name:
p_value -
shardMinDocCount
Regulates the certainty a shard has if the term should actually be added to the candidate list or not with respect to themin_doc_count. Terms will only be considered if their local shard frequency within the set is higher than theshard_min_doc_count.API name:
shard_min_doc_count -
shardSize
Can be used to control the volumes of candidate terms produced by each shard. By default,shard_sizewill be automatically estimated based on the number of shards and thesizeparameter.API name:
shard_size -
size
The number of buckets returned out of the overall terms list.API name:
size -
self
- Specified by:
selfin classBucketAggregationBase.AbstractBuilder<SignificantTermsAggregation.Builder>
-
build
Builds aSignificantTermsAggregation.- Specified by:
buildin interfaceObjectBuilder<SignificantTermsAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-