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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal MatchPhraseQuery.BuilderAnalyzer used to convert the text in the query value into tokens.build()Builds aMatchPhraseQuery.final MatchPhraseQuery.BuilderRequired - The target fieldfinal MatchPhraseQuery.BuilderRequired - Query terms that are analyzed and turned into a phrase query.protected MatchPhraseQuery.Builderself()final MatchPhraseQuery.BuilderMaximum number of positions allowed between matching tokens.final MatchPhraseQuery.BuilderzeroTermsQuery(ZeroTermsQuery value) Indicates whether no documents are returned if theanalyzerremoves all tokens, such as when using astopfilter.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
-
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 theanalyzerremoves all tokens, such as when using astopfilter.API name:
zero_terms_query -
self
- Specified by:
selfin classQueryBase.AbstractBuilder<MatchPhraseQuery.Builder>
-
build
Builds aMatchPhraseQuery.- Specified by:
buildin interfaceObjectBuilder<MatchPhraseQuery>- Throws:
NullPointerException- if some of the required fields are null.
-