Class Query
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.Query
- All Implemented Interfaces:
AggregationVariant,JsonpSerializable,TaggedUnion<Query.Kind,java.lang.Object>
@JsonpDeserializable public class Query extends java.lang.Object implements TaggedUnion<Query.Kind,java.lang.Object>, AggregationVariant, JsonpSerializable
- See Also:
- Documentation on elastic.co, API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQuery.Builderstatic classQuery.KindQueryvariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Query>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description Query(QueryVariant value) -
Method Summary
Modifier and Type Method Description Aggregation.Kind_aggregationKind()Aggregation variant kind.java.lang.Object_get()Query.Kind_kind()Get the of the kind of variant held by this object.BoolQuerybool()Get theboolvariant value.BoostingQueryboosting()Get theboostingvariant value.CombinedFieldsQuerycombinedFields()Get thecombined_fieldsvariant value.CommonTermsQuerycommon()Get thecommonvariant value.ConstantScoreQueryconstantScore()Get theconstant_scorevariant value.DisMaxQuerydisMax()Get thedis_maxvariant value.DistanceFeatureQuerydistanceFeature()Get thedistance_featurevariant value.ExistsQueryexists()Get theexistsvariant value.SpanFieldMaskingQueryfieldMaskingSpan()Get thefield_masking_spanvariant value.FunctionScoreQueryfunctionScore()Get thefunction_scorevariant value.FuzzyQueryfuzzy()Get thefuzzyvariant value.GeoBoundingBoxQuerygeoBoundingBox()Get thegeo_bounding_boxvariant value.GeoDistanceQuerygeoDistance()Get thegeo_distancevariant value.GeoPolygonQuerygeoPolygon()Get thegeo_polygonvariant value.GeoShapeQuerygeoShape()Get thegeo_shapevariant value.HasChildQueryhasChild()Get thehas_childvariant value.HasParentQueryhasParent()Get thehas_parentvariant value.IdsQueryids()Get theidsvariant value.IntervalsQueryintervals()Get theintervalsvariant value.booleanisBool()Is this variant instance of kindbool?booleanisBoosting()Is this variant instance of kindboosting?booleanisCombinedFields()Is this variant instance of kindcombined_fields?booleanisCommon()Is this variant instance of kindcommon?booleanisConstantScore()Is this variant instance of kindconstant_score?booleanisDisMax()Is this variant instance of kinddis_max?booleanisDistanceFeature()Is this variant instance of kinddistance_feature?booleanisExists()Is this variant instance of kindexists?booleanisFieldMaskingSpan()Is this variant instance of kindfield_masking_span?booleanisFunctionScore()Is this variant instance of kindfunction_score?booleanisFuzzy()Is this variant instance of kindfuzzy?booleanisGeoBoundingBox()Is this variant instance of kindgeo_bounding_box?booleanisGeoDistance()Is this variant instance of kindgeo_distance?booleanisGeoPolygon()Is this variant instance of kindgeo_polygon?booleanisGeoShape()Is this variant instance of kindgeo_shape?booleanisHasChild()Is this variant instance of kindhas_child?booleanisHasParent()Is this variant instance of kindhas_parent?booleanisIds()Is this variant instance of kindids?booleanisIntervals()Is this variant instance of kindintervals?booleanisKnn()Is this variant instance of kindknn?booleanisMatch()Is this variant instance of kindmatch?booleanisMatchAll()Is this variant instance of kindmatch_all?booleanisMatchBoolPrefix()Is this variant instance of kindmatch_bool_prefix?booleanisMatchNone()Is this variant instance of kindmatch_none?booleanisMatchPhrase()Is this variant instance of kindmatch_phrase?booleanisMatchPhrasePrefix()Is this variant instance of kindmatch_phrase_prefix?booleanisMoreLikeThis()Is this variant instance of kindmore_like_this?booleanisMultiMatch()Is this variant instance of kindmulti_match?booleanisNested()Is this variant instance of kindnested?booleanisParentId()Is this variant instance of kindparent_id?booleanisPercolate()Is this variant instance of kindpercolate?booleanisPinned()Is this variant instance of kindpinned?booleanisPrefix()Is this variant instance of kindprefix?booleanisQueryString()Is this variant instance of kindquery_string?booleanisRange()Is this variant instance of kindrange?booleanisRankFeature()Is this variant instance of kindrank_feature?booleanisRegexp()Is this variant instance of kindregexp?booleanisScript()Is this variant instance of kindscript?booleanisScriptScore()Is this variant instance of kindscript_score?booleanisShape()Is this variant instance of kindshape?booleanisSimpleQueryString()Is this variant instance of kindsimple_query_string?booleanisSpanContaining()Is this variant instance of kindspan_containing?booleanisSpanFirst()Is this variant instance of kindspan_first?booleanisSpanMulti()Is this variant instance of kindspan_multi?booleanisSpanNear()Is this variant instance of kindspan_near?booleanisSpanNot()Is this variant instance of kindspan_not?booleanisSpanOr()Is this variant instance of kindspan_or?booleanisSpanTerm()Is this variant instance of kindspan_term?booleanisSpanWithin()Is this variant instance of kindspan_within?booleanisTerm()Is this variant instance of kindterm?booleanisTerms()Is this variant instance of kindterms?booleanisTermsSet()Is this variant instance of kindterms_set?booleanisType()Is this variant instance of kindtype?booleanisWildcard()Is this variant instance of kindwildcard?booleanisWrapper()Is this variant instance of kindwrapper?KnnQueryknn()Get theknnvariant value.MatchQuerymatch()Get thematchvariant value.MatchAllQuerymatchAll()Get thematch_allvariant value.MatchBoolPrefixQuerymatchBoolPrefix()Get thematch_bool_prefixvariant value.MatchNoneQuerymatchNone()Get thematch_nonevariant value.MatchPhraseQuerymatchPhrase()Get thematch_phrasevariant value.MatchPhrasePrefixQuerymatchPhrasePrefix()Get thematch_phrase_prefixvariant value.MoreLikeThisQuerymoreLikeThis()Get themore_like_thisvariant value.MultiMatchQuerymultiMatch()Get themulti_matchvariant value.NestedQuerynested()Get thenestedvariant value.static Queryof(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)ParentIdQueryparentId()Get theparent_idvariant value.PercolateQuerypercolate()Get thepercolatevariant value.PinnedQuerypinned()Get thepinnedvariant value.PrefixQueryprefix()Get theprefixvariant value.QueryStringQueryqueryString()Get thequery_stringvariant value.RangeQueryrange()Get therangevariant value.RankFeatureQueryrankFeature()Get therank_featurevariant value.RegexpQueryregexp()Get theregexpvariant value.ScriptQueryscript()Get thescriptvariant value.ScriptScoreQueryscriptScore()Get thescript_scorevariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupQueryDeserializer(ObjectDeserializer<Query.Builder> op)ShapeQueryshape()Get theshapevariant value.SimpleQueryStringQuerysimpleQueryString()Get thesimple_query_stringvariant value.SpanContainingQueryspanContaining()Get thespan_containingvariant value.SpanFirstQueryspanFirst()Get thespan_firstvariant value.SpanMultiTermQueryspanMulti()Get thespan_multivariant value.SpanNearQueryspanNear()Get thespan_nearvariant value.SpanNotQueryspanNot()Get thespan_notvariant value.SpanOrQueryspanOr()Get thespan_orvariant value.SpanTermQueryspanTerm()Get thespan_termvariant value.SpanWithinQueryspanWithin()Get thespan_withinvariant value.TermQueryterm()Get thetermvariant value.TermsQueryterms()Get thetermsvariant value.TermsSetQuerytermsSet()Get theterms_setvariant value.TypeQuerytype()Get thetypevariant value.WildcardQuerywildcard()Get thewildcardvariant value.WrapperQuerywrapper()Get thewrappervariant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch._types.aggregations.AggregationVariant
_toAggregation
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
Query
-
-
Method Details
-
_aggregationKind
Aggregation variant kind.- Specified by:
_aggregationKindin interfaceAggregationVariant
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<Query.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<Query.Kind,java.lang.Object>
-
of
-
isBool
public boolean isBool()Is this variant instance of kindbool? -
bool
Get theboolvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theboolkind.
-
isBoosting
public boolean isBoosting()Is this variant instance of kindboosting? -
boosting
Get theboostingvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theboostingkind.
-
isCommon
public boolean isCommon()Is this variant instance of kindcommon? -
common
Get thecommonvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecommonkind.
-
isCombinedFields
public boolean isCombinedFields()Is this variant instance of kindcombined_fields? -
combinedFields
Get thecombined_fieldsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecombined_fieldskind.
-
isConstantScore
public boolean isConstantScore()Is this variant instance of kindconstant_score? -
constantScore
Get theconstant_scorevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theconstant_scorekind.
-
isDisMax
public boolean isDisMax()Is this variant instance of kinddis_max? -
disMax
Get thedis_maxvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thedis_maxkind.
-
isDistanceFeature
public boolean isDistanceFeature()Is this variant instance of kinddistance_feature? -
distanceFeature
Get thedistance_featurevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thedistance_featurekind.
-
isExists
public boolean isExists()Is this variant instance of kindexists? -
exists
Get theexistsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theexistskind.
-
isFunctionScore
public boolean isFunctionScore()Is this variant instance of kindfunction_score? -
functionScore
Get thefunction_scorevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefunction_scorekind.
-
isFuzzy
public boolean isFuzzy()Is this variant instance of kindfuzzy? -
fuzzy
Get thefuzzyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefuzzykind.
-
isGeoBoundingBox
public boolean isGeoBoundingBox()Is this variant instance of kindgeo_bounding_box? -
geoBoundingBox
Get thegeo_bounding_boxvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thegeo_bounding_boxkind.
-
isGeoDistance
public boolean isGeoDistance()Is this variant instance of kindgeo_distance? -
geoDistance
Get thegeo_distancevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thegeo_distancekind.
-
isGeoPolygon
public boolean isGeoPolygon()Is this variant instance of kindgeo_polygon? -
geoPolygon
Get thegeo_polygonvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thegeo_polygonkind.
-
isGeoShape
public boolean isGeoShape()Is this variant instance of kindgeo_shape? -
geoShape
Get thegeo_shapevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thegeo_shapekind.
-
isHasChild
public boolean isHasChild()Is this variant instance of kindhas_child? -
hasChild
Get thehas_childvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thehas_childkind.
-
isHasParent
public boolean isHasParent()Is this variant instance of kindhas_parent? -
hasParent
Get thehas_parentvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thehas_parentkind.
-
isIds
public boolean isIds()Is this variant instance of kindids? -
ids
Get theidsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theidskind.
-
isIntervals
public boolean isIntervals()Is this variant instance of kindintervals? -
intervals
Get theintervalsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theintervalskind.
-
isKnn
public boolean isKnn()Is this variant instance of kindknn? -
knn
Get theknnvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theknnkind.
-
isMatch
public boolean isMatch()Is this variant instance of kindmatch? -
match
Get thematchvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thematchkind.
-
isMatchAll
public boolean isMatchAll()Is this variant instance of kindmatch_all? -
matchAll
Get thematch_allvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thematch_allkind.
-
isMatchBoolPrefix
public boolean isMatchBoolPrefix()Is this variant instance of kindmatch_bool_prefix? -
matchBoolPrefix
Get thematch_bool_prefixvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thematch_bool_prefixkind.
-
isMatchNone
public boolean isMatchNone()Is this variant instance of kindmatch_none? -
matchNone
Get thematch_nonevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thematch_nonekind.
-
isMatchPhrase
public boolean isMatchPhrase()Is this variant instance of kindmatch_phrase? -
matchPhrase
Get thematch_phrasevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thematch_phrasekind.
-
isMatchPhrasePrefix
public boolean isMatchPhrasePrefix()Is this variant instance of kindmatch_phrase_prefix? -
matchPhrasePrefix
Get thematch_phrase_prefixvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thematch_phrase_prefixkind.
-
isMoreLikeThis
public boolean isMoreLikeThis()Is this variant instance of kindmore_like_this? -
moreLikeThis
Get themore_like_thisvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of themore_like_thiskind.
-
isMultiMatch
public boolean isMultiMatch()Is this variant instance of kindmulti_match? -
multiMatch
Get themulti_matchvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of themulti_matchkind.
-
isNested
public boolean isNested()Is this variant instance of kindnested? -
nested
Get thenestedvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thenestedkind.
-
isParentId
public boolean isParentId()Is this variant instance of kindparent_id? -
parentId
Get theparent_idvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theparent_idkind.
-
isPercolate
public boolean isPercolate()Is this variant instance of kindpercolate? -
percolate
Get thepercolatevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thepercolatekind.
-
isPinned
public boolean isPinned()Is this variant instance of kindpinned? -
pinned
Get thepinnedvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thepinnedkind.
-
isPrefix
public boolean isPrefix()Is this variant instance of kindprefix? -
prefix
Get theprefixvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theprefixkind.
-
isQueryString
public boolean isQueryString()Is this variant instance of kindquery_string? -
queryString
Get thequery_stringvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thequery_stringkind.
-
isRange
public boolean isRange()Is this variant instance of kindrange? -
range
Get therangevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of therangekind.
-
isRankFeature
public boolean isRankFeature()Is this variant instance of kindrank_feature? -
rankFeature
Get therank_featurevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of therank_featurekind.
-
isRegexp
public boolean isRegexp()Is this variant instance of kindregexp? -
regexp
Get theregexpvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theregexpkind.
-
isScript
public boolean isScript()Is this variant instance of kindscript? -
script
Get thescriptvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thescriptkind.
-
isScriptScore
public boolean isScriptScore()Is this variant instance of kindscript_score? -
scriptScore
Get thescript_scorevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thescript_scorekind.
-
isShape
public boolean isShape()Is this variant instance of kindshape? -
shape
Get theshapevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theshapekind.
-
isSimpleQueryString
public boolean isSimpleQueryString()Is this variant instance of kindsimple_query_string? -
simpleQueryString
Get thesimple_query_stringvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thesimple_query_stringkind.
-
isSpanContaining
public boolean isSpanContaining()Is this variant instance of kindspan_containing? -
spanContaining
Get thespan_containingvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_containingkind.
-
isFieldMaskingSpan
public boolean isFieldMaskingSpan()Is this variant instance of kindfield_masking_span? -
fieldMaskingSpan
Get thefield_masking_spanvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefield_masking_spankind.
-
isSpanFirst
public boolean isSpanFirst()Is this variant instance of kindspan_first? -
spanFirst
Get thespan_firstvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_firstkind.
-
isSpanMulti
public boolean isSpanMulti()Is this variant instance of kindspan_multi? -
spanMulti
Get thespan_multivariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_multikind.
-
isSpanNear
public boolean isSpanNear()Is this variant instance of kindspan_near? -
spanNear
Get thespan_nearvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_nearkind.
-
isSpanNot
public boolean isSpanNot()Is this variant instance of kindspan_not? -
spanNot
Get thespan_notvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_notkind.
-
isSpanOr
public boolean isSpanOr()Is this variant instance of kindspan_or? -
spanOr
Get thespan_orvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_orkind.
-
isSpanTerm
public boolean isSpanTerm()Is this variant instance of kindspan_term? -
spanTerm
Get thespan_termvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_termkind.
-
isSpanWithin
public boolean isSpanWithin()Is this variant instance of kindspan_within? -
spanWithin
Get thespan_withinvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_withinkind.
-
isTerm
public boolean isTerm()Is this variant instance of kindterm? -
term
Get thetermvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetermkind.
-
isTerms
public boolean isTerms()Is this variant instance of kindterms? -
terms
Get thetermsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetermskind.
-
isTermsSet
public boolean isTermsSet()Is this variant instance of kindterms_set? -
termsSet
Get theterms_setvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theterms_setkind.
-
isWildcard
public boolean isWildcard()Is this variant instance of kindwildcard? -
wildcard
Get thewildcardvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thewildcardkind.
-
isWrapper
public boolean isWrapper()Is this variant instance of kindwrapper? -
wrapper
Get thewrappervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thewrapperkind.
-
isType
public boolean isType()Is this variant instance of kindtype? -
type
Get thetypevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetypekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
setupQueryDeserializer
-