Class TermSuggester.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.core.search.SuggesterBase.AbstractBuilder<TermSuggester.Builder>
co.elastic.clients.elasticsearch.core.search.TermSuggester.Builder
- All Implemented Interfaces:
WithJson<TermSuggester.Builder>,ObjectBuilder<TermSuggester>
- Enclosing class:
- TermSuggester
public static class TermSuggester.Builder
extends SuggesterBase.AbstractBuilder<TermSuggester.Builder>
implements ObjectBuilder<TermSuggester>
Builder for
TermSuggester.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTermSuggester.final TermSuggester.BuilderlowercaseTerms(Boolean value) API name:lowercase_termsfinal TermSuggester.BuilderThe maximum edit distance candidate suggestions can have in order to be considered as a suggestion.final TermSuggester.BuildermaxInspections(Integer value) A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level.final TermSuggester.BuildermaxTermFreq(Float value) The maximum threshold in number of documents in which a suggest text token can exist in order to be included.final TermSuggester.BuilderminDocFreq(Float value) The minimal threshold in number of documents a suggestion should appear in.final TermSuggester.BuilderminWordLength(Integer value) The minimum length a suggest text term must have in order to be included.final TermSuggester.BuilderprefixLength(Integer value) The number of minimal prefix characters that must match in order be a candidate for suggestions.protected TermSuggester.Builderself()final TermSuggester.BuilderSets the maximum number of suggestions to be retrieved from each individual shard.final TermSuggester.Buildersort(SuggestSort value) Defines how suggestions should be sorted per suggest text term.final TermSuggester.BuilderstringDistance(StringDistance value) The string distance implementation to use for comparing how similar suggested terms are.final TermSuggester.BuildersuggestMode(SuggestMode value) Controls what suggestions are included or controls for what suggest text terms, suggestions should be suggested.final TermSuggester.BuilderThe suggest text.Methods inherited from class co.elastic.clients.elasticsearch.core.search.SuggesterBase.AbstractBuilder
analyzer, field, sizeMethods 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
-
lowercaseTerms
API name:lowercase_terms -
maxEdits
The maximum edit distance candidate suggestions can have in order to be considered as a suggestion. Can only be1or2.API name:
max_edits -
maxInspections
A factor that is used to multiply with the shard_size in order to inspect more candidate spelling corrections on the shard level. Can improve accuracy at the cost of performance.API name:
max_inspections -
maxTermFreq
The maximum threshold in number of documents in which a suggest text token can exist in order to be included. Can be a relative percentage number (for example0.4) or an absolute number to represent document frequencies. If a value higher than 1 is specified, then fractional can not be specified.API name:
max_term_freq -
minDocFreq
The minimal threshold in number of documents a suggestion should appear in. This can improve quality by only suggesting high frequency terms. Can be specified as an absolute number or as a relative percentage of number of documents. If a value higher than 1 is specified, then the number cannot be fractional.API name:
min_doc_freq -
minWordLength
The minimum length a suggest text term must have in order to be included.API name:
min_word_length -
prefixLength
The number of minimal prefix characters that must match in order be a candidate for suggestions. Increasing this number improves spellcheck performance.API name:
prefix_length -
shardSize
Sets the maximum number of suggestions to be retrieved from each individual shard.API name:
shard_size -
sort
Defines how suggestions should be sorted per suggest text term.API name:
sort -
stringDistance
The string distance implementation to use for comparing how similar suggested terms are.API name:
string_distance -
suggestMode
Controls what suggestions are included or controls for what suggest text terms, suggestions should be suggested.API name:
suggest_mode -
text
The suggest text. Needs to be set globally or per suggestion.API name:
text -
self
- Specified by:
selfin classSuggesterBase.AbstractBuilder<TermSuggester.Builder>
-
build
Builds aTermSuggester.- Specified by:
buildin interfaceObjectBuilder<TermSuggester>- Throws:
NullPointerException- if some of the required fields are null.
-