Class QueryStringQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<QueryStringQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.QueryStringQuery.Builder
- All Implemented Interfaces:
WithJson<QueryStringQuery.Builder>,ObjectBuilder<QueryStringQuery>
- Enclosing class:
- QueryStringQuery
public static class QueryStringQuery.Builder
extends QueryBase.AbstractBuilder<QueryStringQuery.Builder>
implements ObjectBuilder<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.final QueryStringQuery.BuilderdefaultField(String value) Default field to search if no field is provided in the query string.final QueryStringQuery.BuilderdefaultOperator(Operator value) Default boolean logic used to interpret text in the query string if no operators are specified.final 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.BuilderMaximum edit distance allowed for fuzzy matching.final 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) Method used to rewrite the query.final 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) Minimum number of clauses that must match for a document to be returned.final QueryStringQuery.BuilderphraseSlop(Double 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.BuilderMethod used to rewrite the query.protected QueryStringQuery.Builderself()final QueryStringQuery.BuildertieBreaker(Double value) How to combine the queries generated from the individual search terms in the resultingdis_maxquery.final QueryStringQuery.BuilderCoordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.final QueryStringQuery.Buildertype(TextQueryType value) Determines how the query matches and scores documents.Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryNameMethods 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
-
allowLeadingWildcard
Iftrue, the wildcard characters*and?are allowed as the first character of the query string.API name:
allow_leading_wildcard -
analyzer
Analyzer used to convert text in the query string into tokens.API name:
analyzer -
analyzeWildcard
Iftrue, the query attempts to analyze wildcard terms in the query string.API name:
analyze_wildcard -
autoGenerateSynonymsPhraseQuery
Iftrue, match phrase queries are automatically created for multi-term synonyms.API name:
auto_generate_synonyms_phrase_query -
defaultField
Default field to search if no field is provided in the query string. Supports wildcards (*). Defaults to theindex.query.default_fieldindex setting, which has a default value of*.API name:
default_field -
defaultOperator
Default boolean logic used to interpret text in the query string if no operators are specified.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
Maximum edit distance allowed for fuzzy matching.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
Method used to rewrite the query.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
Minimum number of clauses that must match for a document to be returned.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
Method used to rewrite the query.API name:
rewrite -
tieBreaker
How to combine the queries generated from the individual search terms in the resultingdis_maxquery.API name:
tie_breaker -
timeZone
Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.API name:
time_zone -
type
Determines how the query matches and scores documents.API name:
type -
self
- Specified by:
selfin classQueryBase.AbstractBuilder<QueryStringQuery.Builder>
-
build
Builds aQueryStringQuery.- Specified by:
buildin interfaceObjectBuilder<QueryStringQuery>- Throws:
NullPointerException- if some of the required fields are null.
-