Class MatchPhraseQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<MatchPhraseQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.MatchPhraseQuery.Builder
- All Implemented Interfaces:
WithJson<MatchPhraseQuery.Builder>
,ObjectBuilder<MatchPhraseQuery>
- Enclosing class:
- MatchPhraseQuery
public static class MatchPhraseQuery.Builder
extends QueryBase.AbstractBuilder<MatchPhraseQuery.Builder>
implements ObjectBuilder<MatchPhraseQuery>
Builder for
MatchPhraseQuery
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal MatchPhraseQuery.Builder
Analyzer used to convert the text in the query value into tokens.build()
Builds aMatchPhraseQuery
.final MatchPhraseQuery.Builder
Required - The target fieldfinal MatchPhraseQuery.Builder
Required - Query terms that are analyzed and turned into a phrase query.protected MatchPhraseQuery.Builder
self()
final MatchPhraseQuery.Builder
Maximum number of positions allowed between matching tokens.final MatchPhraseQuery.Builder
zeroTermsQuery
(ZeroTermsQuery value) Indicates whether no documents are returned if theanalyzer
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
-
field
Required - The target field -
analyzer
Analyzer used to convert the text in the query value into tokens.API name:
analyzer
-
query
Required - Query terms that are analyzed and turned into a phrase query.API name:
query
-
slop
Maximum number of positions allowed between matching tokens.API name:
slop
-
zeroTermsQuery
Indicates whether no documents are returned if theanalyzer
removes all tokens, such as when using astop
filter.API name:
zero_terms_query
-
self
- Specified by:
self
in classQueryBase.AbstractBuilder<MatchPhraseQuery.Builder>
-
build
Builds aMatchPhraseQuery
.- Specified by:
build
in interfaceObjectBuilder<MatchPhraseQuery>
- Throws:
NullPointerException
- if some of the required fields are null.
-