Class MultiMatchQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<MultiMatchQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.MultiMatchQuery.Builder
- All Implemented Interfaces:
WithJson<MultiMatchQuery.Builder>
,ObjectBuilder<MultiMatchQuery>
- Enclosing class:
- MultiMatchQuery
public static class MultiMatchQuery.Builder
extends QueryBase.AbstractBuilder<MultiMatchQuery.Builder>
implements ObjectBuilder<MultiMatchQuery>
Builder for
MultiMatchQuery
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal MultiMatchQuery.Builder
Analyzer used to convert the text in the query value into tokens.final MultiMatchQuery.Builder
Iftrue
, match phrase queries are automatically created for multi-term synonyms.build()
Builds aMultiMatchQuery
.final MultiMatchQuery.Builder
cutoffFrequency
(Double value) Deprecated.7.3.0final MultiMatchQuery.Builder
The fields to be queried.final MultiMatchQuery.Builder
The fields to be queried.final MultiMatchQuery.Builder
Maximum edit distance allowed for matching.final MultiMatchQuery.Builder
fuzzyRewrite
(String value) Method used to rewrite the query.final MultiMatchQuery.Builder
fuzzyTranspositions
(Boolean value) Iftrue
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
).final MultiMatchQuery.Builder
Iftrue
, format-based errors, such as providing a text query value for a numeric field, are ignored.final MultiMatchQuery.Builder
maxExpansions
(Integer value) Maximum number of terms to which the query will expand.final MultiMatchQuery.Builder
minimumShouldMatch
(String value) Minimum number of clauses that must match for a document to be returned.final MultiMatchQuery.Builder
Boolean logic used to interpret text in the query value.final MultiMatchQuery.Builder
prefixLength
(Integer value) Number of beginning characters left unchanged for fuzzy matching.final MultiMatchQuery.Builder
Required - Text, number, boolean value or date you wish to find in the provided field.protected MultiMatchQuery.Builder
self()
final MultiMatchQuery.Builder
Maximum number of positions allowed between matching tokens.final MultiMatchQuery.Builder
tieBreaker
(Double value) Determines how scores for each per-term blended query and scores across groups are combined.final MultiMatchQuery.Builder
type
(TextQueryType value) Howthe
multi_match query is executed internally.final MultiMatchQuery.Builder
zeroTermsQuery
(ZeroTermsQuery value) Indicates whether no documents are returned if theanalyzer
removes all tokens, such as when using astop
filter.Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryName
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
analyzer
Analyzer used to convert the text in the query value into tokens.API name:
analyzer
-
autoGenerateSynonymsPhraseQuery
Iftrue
, match phrase queries are automatically created for multi-term synonyms.API name:
auto_generate_synonyms_phrase_query
-
cutoffFrequency
Deprecated.7.3.0API name:cutoff_frequency
-
fields
The fields to be queried. Defaults to theindex.query.default_field
index settings, which in turn defaults to*
.API name:
fields
Adds all elements of
list
tofields
. -
fields
The fields to be queried. Defaults to theindex.query.default_field
index settings, which in turn defaults to*
.API name:
fields
Adds one or more values to
fields
. -
fuzziness
Maximum edit distance allowed for matching.API name:
fuzziness
-
fuzzyRewrite
Method used to rewrite the query.API name:
fuzzy_rewrite
-
fuzzyTranspositions
Iftrue
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). Can be applied to the term subqueries constructed for all terms but the final term.API name:
fuzzy_transpositions
-
lenient
Iftrue
, format-based errors, such as providing a text query value for a numeric field, are ignored.API name:
lenient
-
maxExpansions
Maximum number of terms to which the query will expand.API name:
max_expansions
-
minimumShouldMatch
Minimum number of clauses that must match for a document to be returned.API name:
minimum_should_match
-
operator
Boolean logic used to interpret text in the query value.API name:
operator
-
prefixLength
Number of beginning characters left unchanged for fuzzy matching.API name:
prefix_length
-
query
Required - Text, number, boolean value or date you wish to find in the provided field.API name:
query
-
slop
Maximum number of positions allowed between matching tokens.API name:
slop
-
tieBreaker
Determines how scores for each per-term blended query and scores across groups are combined.API name:
tie_breaker
-
type
Howthe
multi_match query is executed internally.API name:
type
-
zeroTermsQuery
Indicates whether no documents are returned if theanalyzer
removes all tokens, such as when using astop
filter.API name:
zero_terms_query
-
self
- Specified by:
self
in classQueryBase.AbstractBuilder<MultiMatchQuery.Builder>
-
build
Builds aMultiMatchQuery
.- Specified by:
build
in interfaceObjectBuilder<MultiMatchQuery>
- Throws:
NullPointerException
- if some of the required fields are null.
-