Class SimpleQueryStringQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<SimpleQueryStringQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.SimpleQueryStringQuery.Builder
- All Implemented Interfaces:
WithJson<SimpleQueryStringQuery.Builder>,ObjectBuilder<SimpleQueryStringQuery>
- Enclosing class:
- SimpleQueryStringQuery
public static class SimpleQueryStringQuery.Builder
extends QueryBase.AbstractBuilder<SimpleQueryStringQuery.Builder>
implements ObjectBuilder<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 a match_phrase query for each multi-position token.build()Builds aSimpleQueryStringQuery.defaultOperator(Operator value) Default boolean logic used to interpret text in the query string if no operators are specified.Array of fields you wish to search.Array of fields you wish to search.flags(SimpleQueryStringFlag value, SimpleQueryStringFlag... values) List of enabled operators for the simple query string syntax.flags(List<SimpleQueryStringFlag> list) List of enabled operators for the simple query string syntax.fuzzyMaxExpansions(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) Minimum number of clauses that must match for a document to be returned.Required - 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 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
-
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
public final SimpleQueryStringQuery.Builder autoGenerateSynonymsPhraseQuery(@Nullable Boolean value) Iftrue, the parser creates a match_phrase query for each multi-position token.API name:
auto_generate_synonyms_phrase_query -
defaultOperator
Default boolean logic used to interpret text in the query string if no operators are specified.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
List of enabled operators for the simple query string syntax.API name:
flagsAdds all elements of
listtoflags. -
flags
public final SimpleQueryStringQuery.Builder flags(SimpleQueryStringFlag value, SimpleQueryStringFlag... values) List of enabled operators for the simple query string syntax.API name:
flagsAdds one or more values to
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
Minimum number of clauses that must match for a document to be returned.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 -
self
- Specified by:
selfin classQueryBase.AbstractBuilder<SimpleQueryStringQuery.Builder>
-
build
Builds aSimpleQueryStringQuery.- Specified by:
buildin interfaceObjectBuilder<SimpleQueryStringQuery>- Throws:
NullPointerException- if some of the required fields are null.
-