Class MatchQuery.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder<MatchQuery.Builder>
org.opensearch.client.opensearch._types.query_dsl.MatchQuery.Builder
- All Implemented Interfaces:
CopyableBuilder<MatchQuery.Builder,,MatchQuery> MutableBuilder<MatchQuery.Builder,,MatchQuery> ObjectBuilder<MatchQuery>
- Enclosing class:
MatchQuery
public static class MatchQuery.Builder
extends QueryBase.AbstractBuilder<MatchQuery.Builder>
implements CopyableBuilder<MatchQuery.Builder,MatchQuery>
Builder for
MatchQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal MatchQuery.BuilderAnalyzer used to convert the text in the query value into tokens.final MatchQuery.BuilderIftrue, match phrase queries are automatically created for multi-term synonyms.build()Builds aMatchQuery.copy()Create a new builderCopyableBuilderthat is a copy of this one.final MatchQuery.BuildercutoffFrequency(Float value) API name:cutoff_frequencyfinal MatchQuery.BuilderRequired - The target fieldfinal MatchQuery.BuilderAPI name:fuzzinessfinal MatchQuery.BuilderfuzzyRewrite(String value) API name:fuzzy_rewritefinal MatchQuery.BuilderfuzzyTranspositions(Boolean value) Iftrue, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba).final MatchQuery.BuilderIftrue, format-based errors, such as providing a text query value for a numeric field, are ignored.final MatchQuery.BuildermaxExpansions(Integer value) Maximum number of terms to which the query will expand.final MatchQuery.BuilderminimumShouldMatch(String value) API name:minimum_should_matchfinal MatchQuery.BuilderAPI name:operatorfinal MatchQuery.BuilderprefixLength(Integer value) Number of beginning characters left unchanged for fuzzy matching.final MatchQuery.BuilderRequired - Text, number, Boolean value or date you wish to find in the provided field.final MatchQuery.Builderquery(FieldValue value) Required - Text, number, Boolean value or date you wish to find in the provided field.protected MatchQuery.Builderself()final MatchQuery.BuilderzeroTermsQuery(ZeroTermsQuery value) API name:zero_terms_queryMethods inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryNameMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<MatchQuery.Builder,MatchQuery> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classQueryBase.AbstractBuilder<MatchQuery.Builder>
-
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
API name:cutoff_frequency -
field
Required - The target field -
fuzziness
API name:fuzziness -
fuzzyRewrite
API name:fuzzy_rewrite -
fuzzyTranspositions
Iftrue, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba).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
API name:minimum_should_match -
operator
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 -
query
@Nonnull public final MatchQuery.Builder query(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) Required - Text, number, Boolean value or date you wish to find in the provided field.API name:
query -
zeroTermsQuery
API name:zero_terms_query -
build
Builds aMatchQuery.- Specified by:
buildin interfaceObjectBuilder<MatchQuery>- Throws:
NullPointerException- if some of the required fields are null.
-