Class SimpleQueryStringQuery.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder<SimpleQueryStringQuery.Builder>
org.opensearch.client.opensearch._types.query_dsl.SimpleQueryStringQuery.Builder
- All Implemented Interfaces:
CopyableBuilder<SimpleQueryStringQuery.Builder,,SimpleQueryStringQuery> MutableBuilder<SimpleQueryStringQuery.Builder,,SimpleQueryStringQuery> ObjectBuilder<SimpleQueryStringQuery>
- Enclosing class:
SimpleQueryStringQuery
public static class SimpleQueryStringQuery.Builder
extends QueryBase.AbstractBuilder<SimpleQueryStringQuery.Builder>
implements CopyableBuilder<SimpleQueryStringQuery.Builder,SimpleQueryStringQuery>
Builder for
SimpleQueryStringQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAnalyzer used to convert text in the query string into tokens.analyzeWildcard(Boolean value) Iftrue, the query attempts to analyze wildcard terms in the query string.Iftrue, the parser creates amatch_phrasequery for each multi-position token.build()Builds aSimpleQueryStringQuery.copy()Create a new builderCopyableBuilderthat is a copy of this one.defaultOperator(Operator value) API name:default_operatorArray of fields you wish to search.Array of fields you wish to search.API name:flagsflags(SimpleQueryStringFlags value) API name:flagsfuzzyMaxExpansions(Integer value) Maximum number of terms to which the query expands for fuzzy matching.fuzzyPrefixLength(Integer value) Number of beginning characters left unchanged for fuzzy matching.fuzzyTranspositions(Boolean value) Iftrue, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba).Iftrue, format-based errors, such as providing a text value for a numeric field, are ignored.minimumShouldMatch(String value) API name:minimum_should_matchRequired - Query string in the simple query string syntax you wish to parse and use for search.quoteFieldSuffix(String value) Suffix appended to quoted text in the query string.protected SimpleQueryStringQuery.Builderself()Methods 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<SimpleQueryStringQuery.Builder,SimpleQueryStringQuery> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classQueryBase.AbstractBuilder<SimpleQueryStringQuery.Builder>
-
analyzeWildcard
Iftrue, the query attempts to analyze wildcard terms in the query string.API name:
analyze_wildcard -
analyzer
Analyzer used to convert text in the query string into tokens.API name:
analyzer -
autoGenerateSynonymsPhraseQuery
@Nonnull public final SimpleQueryStringQuery.Builder autoGenerateSynonymsPhraseQuery(@Nullable Boolean value) Iftrue, the parser creates amatch_phrasequery for each multi-position token.API name:
auto_generate_synonyms_phrase_query -
defaultOperator
API name:default_operator -
fields
Array of fields you wish to search. Accepts wildcard expressions. You also can boost relevance scores for matches to particular fields using a caret (^) notation. Defaults to theindex.query.default_field indexsetting, which has a default value of*.API name:
fieldsAdds all elements of
listtofields. -
fields
Array of fields you wish to search. Accepts wildcard expressions. You also can boost relevance scores for matches to particular fields using a caret (^) notation. Defaults to theindex.query.default_field indexsetting, which has a default value of*.API name:
fieldsAdds one or more values to
fields. -
flags
API name:flags -
flags
@Nonnull public final SimpleQueryStringQuery.Builder flags(Function<SimpleQueryStringFlags.Builder, ObjectBuilder<SimpleQueryStringFlags>> fn) API name:flags -
fuzzyMaxExpansions
Maximum number of terms to which the query expands for fuzzy matching.API name:
fuzzy_max_expansions -
fuzzyPrefixLength
Number of beginning characters left unchanged for fuzzy matching.API name:
fuzzy_prefix_length -
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 value for a numeric field, are ignored.API name:
lenient -
minimumShouldMatch
API name:minimum_should_match -
query
Required - Query string in the simple query string syntax you wish to parse and use for search.API name:
query -
quoteFieldSuffix
Suffix appended to quoted text in the query string.API name:
quote_field_suffix -
build
Builds aSimpleQueryStringQuery.- Specified by:
buildin interfaceObjectBuilder<SimpleQueryStringQuery>- Throws:
NullPointerException- if some of the required fields are null.
-