Class SignificantTextAggregationDescriptor<T>
An aggregation that returns interesting or unusual occurrences of free-text terms in a set.
Inheritance
SignificantTextAggregationDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class SignificantTextAggregationDescriptor<T> : BucketAggregationDescriptorBase<SignificantTextAggregationDescriptor<T>, ISignificantTextAggregation, T>, IDescriptor, ISignificantTextAggregation, IBucketAggregation, IAggregation where T : class
Type Parameters
Methods
|
Edit this page
View Source
BackgroundFilter(Func<QueryContainerDescriptor<T>, QueryContainer>)
The default source of statistical information for background term
frequencies is the entire index. This scope can be narrowed
through the use of a background filter to focus in on significant
terms within a narrower context
Declaration
public SignificantTextAggregationDescriptor<T> BackgroundFilter(Func<QueryContainerDescriptor<T>, QueryContainer> selector)
Parameters
Returns
|
Edit this page
View Source
ChiSquare(Func<ChiSquareHeuristicDescriptor, IChiSquareHeuristic>)
Use chi square to calculate significance score
Declaration
public SignificantTextAggregationDescriptor<T> ChiSquare(Func<ChiSquareHeuristicDescriptor, IChiSquareHeuristic> chiSquareSelector)
Parameters
Returns
|
Edit this page
View Source
Exclude(IEnumerable<string>)
Exclude term values for which buckets will be created.
Declaration
public SignificantTextAggregationDescriptor<T> Exclude(IEnumerable<string> values)
Parameters
Returns
|
Edit this page
View Source
Exclude(string)
Exclude term values for which buckets will be created.
Declaration
public SignificantTextAggregationDescriptor<T> Exclude(string excludePattern)
Parameters
Type |
Name |
Description |
string |
excludePattern |
|
Returns
|
Edit this page
View Source
ExecutionHint(TermsAggregationExecutionHint?)
Determines the mechanism by which aggregations are executed
Declaration
public SignificantTextAggregationDescriptor<T> ExecutionHint(TermsAggregationExecutionHint? hint)
Parameters
Returns
|
Edit this page
View Source
Field(Field)
The field on which to run the aggregation
Declaration
public SignificantTextAggregationDescriptor<T> Field(Field field)
Parameters
Type |
Name |
Description |
Field |
field |
|
Returns
|
Edit this page
View Source
Field<TValue>(Expression<Func<T, TValue>>)
The field on which to run the aggregation
Declaration
public SignificantTextAggregationDescriptor<T> Field<TValue>(Expression<Func<T, TValue>> field)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
FilterDuplicateText(bool?)
Whether to filter out near-duplicate text
Declaration
public SignificantTextAggregationDescriptor<T> FilterDuplicateText(bool? filterDuplicateText = true)
Parameters
Type |
Name |
Description |
bool? |
filterDuplicateText |
|
Returns
|
Edit this page
View Source
GoogleNormalizedDistance(Func<GoogleNormalizedDistanceHeuristicDescriptor, IGoogleNormalizedDistanceHeuristic>)
Use Google normalized distance to calculate significance score
Declaration
public SignificantTextAggregationDescriptor<T> GoogleNormalizedDistance(Func<GoogleNormalizedDistanceHeuristicDescriptor, IGoogleNormalizedDistanceHeuristic> gndSelector)
Parameters
Returns
|
Edit this page
View Source
Include(IEnumerable<string>)
Include term values for which buckets will be created.
Declaration
public SignificantTextAggregationDescriptor<T> Include(IEnumerable<string> values)
Parameters
Returns
|
Edit this page
View Source
Include(string)
Include term values for which buckets will be created.
Declaration
public SignificantTextAggregationDescriptor<T> Include(string includePattern)
Parameters
Type |
Name |
Description |
string |
includePattern |
|
Returns
|
Edit this page
View Source
MinimumDocumentCount(long?)
Return only terms that match equal to or more than a configurable
number of hits
Declaration
public SignificantTextAggregationDescriptor<T> MinimumDocumentCount(long? minimumDocumentCount)
Parameters
Type |
Name |
Description |
long? |
minimumDocumentCount |
|
Returns
|
Edit this page
View Source
MutualInformation(Func<MutualInformationHeuristicDescriptor, IMutualInformationHeuristic>)
Use mutual information to calculate significance score
Declaration
public SignificantTextAggregationDescriptor<T> MutualInformation(Func<MutualInformationHeuristicDescriptor, IMutualInformationHeuristic> mutualInformationSelector = null)
Parameters
Returns
|
Edit this page
View Source
PercentageScore(Func<PercentageScoreHeuristicDescriptor, IPercentageScoreHeuristic>)
Use percentage to calculate 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. By default this produces a score greater than zero
and less than one.
Declaration
public SignificantTextAggregationDescriptor<T> PercentageScore(Func<PercentageScoreHeuristicDescriptor, IPercentageScoreHeuristic> percentageScoreSelector)
Parameters
Returns
|
Edit this page
View Source
Script(Func<ScriptedHeuristicDescriptor, IScriptedHeuristic>)
Use a script to calculate a custom significance score.
Declaration
public SignificantTextAggregationDescriptor<T> Script(Func<ScriptedHeuristicDescriptor, IScriptedHeuristic> scriptSelector)
Parameters
Returns
|
Edit this page
View Source
ShardMinimumDocumentCount(long?)
Regulates the certainty a shard has if the term should actually be added to the candidate
list or not with respect to the MinimumDocumentCount.
Terms will only be considered if their local shard frequency within
the set is higher than the ShardMinimumDocumentCount.
Declaration
public SignificantTextAggregationDescriptor<T> ShardMinimumDocumentCount(long? shardMinimumDocumentCount)
Parameters
Type |
Name |
Description |
long? |
shardMinimumDocumentCount |
|
Returns
|
Edit this page
View Source
ShardSize(int?)
Controls the number of candidate terms produced by each shard from which
the Size of terms is selected.
Declaration
public SignificantTextAggregationDescriptor<T> ShardSize(int? shardSize)
Parameters
Type |
Name |
Description |
int? |
shardSize |
|
Returns
|
Edit this page
View Source
Size(int?)
Defines how many term buckets should be returned out of the overall
terms list
Declaration
public SignificantTextAggregationDescriptor<T> Size(int? size)
Parameters
Type |
Name |
Description |
int? |
size |
|
Returns
|
Edit this page
View Source
SourceFields(Fields)
Ordinarily the indexed field name and the original JSON field being
retrieved share the same name. However with more complex field
mappings using features like copy_to the source JSON field(s)
and the indexed field being aggregated can differ.
In these cases it is possible to list the JSON _source fields
from which text will be analyzed using SourceFields
Declaration
public SignificantTextAggregationDescriptor<T> SourceFields(Fields sourceFields)
Parameters
Type |
Name |
Description |
Fields |
sourceFields |
|
Returns
|
Edit this page
View Source
SourceFields(Func<FieldsDescriptor<T>, IPromise<Fields>>)
Ordinarily the indexed field name and the original JSON field being
retrieved share the same name. However with more complex field
mappings using features like copy_to the source JSON field(s)
and the indexed field being aggregated can differ.
In these cases it is possible to list the JSON _source fields
from which text will be analyzed using SourceFields
Declaration
public SignificantTextAggregationDescriptor<T> SourceFields(Func<FieldsDescriptor<T>, IPromise<Fields>> sourceFields)
Parameters
Returns
Implements
Extension Methods