Class CombinedFieldsQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<CombinedFieldsQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.CombinedFieldsQuery.Builder
- All Implemented Interfaces:
WithJson<CombinedFieldsQuery.Builder>
,ObjectBuilder<CombinedFieldsQuery>
- Enclosing class:
- CombinedFieldsQuery
public static class CombinedFieldsQuery.Builder
extends QueryBase.AbstractBuilder<CombinedFieldsQuery.Builder>
implements ObjectBuilder<CombinedFieldsQuery>
Builder for
CombinedFieldsQuery
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIf true, match phrase queries are automatically created for multi-term synonyms.build()
Builds aCombinedFieldsQuery
.Required - List of fields to search.Required - List of fields to search.minimumShouldMatch
(String value) Minimum number of clauses that must match for a document to be returned.operator
(CombinedFieldsOperator value) Boolean logic used to interpret text in the query value.Required - Text to search for in the providedfields
.protected CombinedFieldsQuery.Builder
self()
Indicates whether no documents are returned if the analyzer removes all tokens, such as when using astop
filter.Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryName
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fields
Required - List of fields to search. Field wildcard patterns are allowed. Onlytext
fields are supported, and they must all have the same searchanalyzer
.API name:
fields
Adds all elements of
list
tofields
. -
fields
Required - List of fields to search. Field wildcard patterns are allowed. Onlytext
fields are supported, and they must all have the same searchanalyzer
.API name:
fields
Adds one or more values to
fields
. -
query
Required - Text to search for in the providedfields
. Thecombined_fields
query analyzes the provided text before performing a search.API name:
query
-
autoGenerateSynonymsPhraseQuery
If true, match phrase queries are automatically created for multi-term synonyms.API name:
auto_generate_synonyms_phrase_query
-
operator
Boolean logic used to interpret text in the query value.API name:
operator
-
minimumShouldMatch
Minimum number of clauses that must match for a document to be returned.API name:
minimum_should_match
-
zeroTermsQuery
Indicates whether no documents are returned if the analyzer removes all tokens, such as when using astop
filter.API name:
zero_terms_query
-
self
- Specified by:
self
in classQueryBase.AbstractBuilder<CombinedFieldsQuery.Builder>
-
build
Builds aCombinedFieldsQuery
.- Specified by:
build
in interfaceObjectBuilder<CombinedFieldsQuery>
- Throws:
NullPointerException
- if some of the required fields are null.
-