Class QueryStringQuery.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder<QueryStringQuery.Builder>
org.opensearch.client.opensearch._types.query_dsl.QueryStringQuery.Builder
- All Implemented Interfaces:
CopyableBuilder<QueryStringQuery.Builder,,QueryStringQuery> MutableBuilder<QueryStringQuery.Builder,,QueryStringQuery> ObjectBuilder<QueryStringQuery>
- Enclosing class:
QueryStringQuery
public static class QueryStringQuery.Builder
extends QueryBase.AbstractBuilder<QueryStringQuery.Builder>
implements CopyableBuilder<QueryStringQuery.Builder,QueryStringQuery>
Builder for
QueryStringQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal QueryStringQuery.BuilderallowLeadingWildcard(Boolean value) Iftrue, the wildcard characters*and?are allowed as the first character of the query string.final QueryStringQuery.BuilderAnalyzer used to convert text in the query string into tokens.final QueryStringQuery.BuilderanalyzeWildcard(Boolean value) Iftrue, the query attempts to analyze wildcard terms in the query string.final QueryStringQuery.BuilderIftrue, match phrase queries are automatically created for multi-term synonyms.build()Builds aQueryStringQuery.copy()Create a new builderCopyableBuilderthat is a copy of this one.final QueryStringQuery.BuilderdefaultField(String value) API name:default_fieldfinal QueryStringQuery.BuilderdefaultOperator(Operator value) API name:default_operatorfinal QueryStringQuery.BuilderenablePositionIncrements(Boolean value) Iftrue, enable position increments in queries constructed from aquery_stringsearch.final QueryStringQuery.BuilderAPI name:escapefinal QueryStringQuery.BuilderArray of fields to search.final QueryStringQuery.BuilderArray of fields to search.final QueryStringQuery.BuilderAPI name:fuzzinessfinal QueryStringQuery.BuilderfuzzyMaxExpansions(Integer value) Maximum number of terms to which the query expands for fuzzy matching.final QueryStringQuery.BuilderfuzzyPrefixLength(Integer value) Number of beginning characters left unchanged for fuzzy matching.final QueryStringQuery.BuilderfuzzyRewrite(String value) API name:fuzzy_rewritefinal QueryStringQuery.BuilderfuzzyTranspositions(Boolean value) Iftrue, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba).final QueryStringQuery.BuilderIftrue, format-based errors, such as providing a text value for a numeric field, are ignored.final QueryStringQuery.BuildermaxDeterminizedStates(Integer value) Maximum number of automaton states required for the query.final QueryStringQuery.BuilderminimumShouldMatch(String value) API name:minimum_should_matchfinal QueryStringQuery.BuilderphraseSlop(Integer value) Maximum number of positions allowed between matching tokens for phrases.final QueryStringQuery.BuilderRequired - Query string you wish to parse and use for search.final QueryStringQuery.BuilderquoteAnalyzer(String value) Analyzer used to convert quoted text in the query string into tokens.final QueryStringQuery.BuilderquoteFieldSuffix(String value) Suffix appended to quoted text in the query string.final QueryStringQuery.BuilderAPI name:rewriteprotected QueryStringQuery.Builderself()final QueryStringQuery.BuildertieBreaker(Float value) How to combine the queries generated from the individual search terms in the resultingdis_maxquery.final QueryStringQuery.BuilderAPI name:time_zonefinal QueryStringQuery.Buildertype(TextQueryType value) API name:typeMethods 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<QueryStringQuery.Builder,QueryStringQuery> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classQueryBase.AbstractBuilder<QueryStringQuery.Builder>
-
allowLeadingWildcard
Iftrue, the wildcard characters*and?are allowed as the first character of the query string.API name:
allow_leading_wildcard -
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 QueryStringQuery.Builder autoGenerateSynonymsPhraseQuery(@Nullable Boolean value) Iftrue, match phrase queries are automatically created for multi-term synonyms.API name:
auto_generate_synonyms_phrase_query -
defaultField
API name:default_field -
defaultOperator
API name:default_operator -
enablePositionIncrements
Iftrue, enable position increments in queries constructed from aquery_stringsearch.API name:
enable_position_increments -
escape
API name:escape -
fields
Array of fields to search. Supports wildcards (*).API name:
fieldsAdds all elements of
listtofields. -
fields
Array of fields to search. Supports wildcards (*).API name:
fieldsAdds one or more values to
fields. -
fuzziness
API name:fuzziness -
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 -
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 value for a numeric field, are ignored.API name:
lenient -
maxDeterminizedStates
Maximum number of automaton states required for the query.API name:
max_determinized_states -
minimumShouldMatch
API name:minimum_should_match -
phraseSlop
Maximum number of positions allowed between matching tokens for phrases.API name:
phrase_slop -
query
Required - Query string you wish to parse and use for search.API name:
query -
quoteAnalyzer
Analyzer used to convert quoted text in the query string into tokens. For quoted text, this parameter overrides the analyzer specified in theanalyzerparameter.API name:
quote_analyzer -
quoteFieldSuffix
Suffix appended to quoted text in the query string. You can use this suffix to use a different analysis method for exact matches.API name:
quote_field_suffix -
rewrite
API name:rewrite -
tieBreaker
How to combine the queries generated from the individual search terms in the resultingdis_maxquery.API name:
tie_breaker -
timeZone
API name:time_zone -
type
API name:type -
build
Builds aQueryStringQuery.- Specified by:
buildin interfaceObjectBuilder<QueryStringQuery>- Throws:
NullPointerException- if some of the required fields are null.
-