Class Query
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.Query
- All Implemented Interfaces:
AggregationVariant
,JsonpSerializable
,OpenTaggedUnion<Query.Kind,
,Object> TaggedUnion<Query.Kind,
Object>
@JsonpDeserializable
public class Query
extends Object
implements OpenTaggedUnion<Query.Kind,Object>, AggregationVariant, JsonpSerializable
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind._custom()
Get the custom plugin-defined variant value.final String
Get the actual kind when_kind()
equalsQuery.Kind._Custom
(plugin-defined variant).final Object
_get()
boolean
Is this a customQuery
defined by a plugin?final Query.Kind
_kind()
Get the of the kind of variant held by this object.bool()
Get thebool
variant value.boosting()
Get theboosting
variant value.Get thecombined_fields
variant value.common()
Get thecommon
variant value.Get theconstant_score
variant value.disMax()
Get thedis_max
variant value.Get thedistance_feature
variant value.exists()
Get theexists
variant value.Get thefield_masking_span
variant value.Get thefunction_score
variant value.fuzzy()
Get thefuzzy
variant value.Get thegeo_bounding_box
variant value.Get thegeo_distance
variant value.Get thegeo_polygon
variant value.geoShape()
Get thegeo_shape
variant value.hasChild()
Get thehas_child
variant value.Get thehas_parent
variant value.ids()
Get theids
variant value.Get theintervals
variant value.boolean
isBool()
Is this variant instance of kindbool
?boolean
Is this variant instance of kindboosting
?boolean
Is this variant instance of kindcombined_fields
?boolean
isCommon()
Is this variant instance of kindcommon
?boolean
Is this variant instance of kindconstant_score
?boolean
isDisMax()
Is this variant instance of kinddis_max
?boolean
Is this variant instance of kinddistance_feature
?boolean
isExists()
Is this variant instance of kindexists
?boolean
Is this variant instance of kindfield_masking_span
?boolean
Is this variant instance of kindfunction_score
?boolean
isFuzzy()
Is this variant instance of kindfuzzy
?boolean
Is this variant instance of kindgeo_bounding_box
?boolean
Is this variant instance of kindgeo_distance
?boolean
Is this variant instance of kindgeo_polygon
?boolean
Is this variant instance of kindgeo_shape
?boolean
Is this variant instance of kindhas_child
?boolean
Is this variant instance of kindhas_parent
?boolean
isIds()
Is this variant instance of kindids
?boolean
Is this variant instance of kindintervals
?boolean
isMatch()
Is this variant instance of kindmatch
?boolean
Is this variant instance of kindmatch_all
?boolean
Is this variant instance of kindmatch_bool_prefix
?boolean
Is this variant instance of kindmatch_none
?boolean
Is this variant instance of kindmatch_phrase
?boolean
Is this variant instance of kindmatch_phrase_prefix
?boolean
Is this variant instance of kindmore_like_this
?boolean
Is this variant instance of kindmulti_match
?boolean
isNested()
Is this variant instance of kindnested
?boolean
Is this variant instance of kindparent_id
?boolean
Is this variant instance of kindpercolate
?boolean
isPinned()
Is this variant instance of kindpinned
?boolean
isPrefix()
Is this variant instance of kindprefix
?boolean
Is this variant instance of kindquery_string
?boolean
isRange()
Is this variant instance of kindrange
?boolean
Is this variant instance of kindrank_feature
?boolean
isRegexp()
Is this variant instance of kindregexp
?boolean
isScript()
Is this variant instance of kindscript
?boolean
Is this variant instance of kindscript_score
?boolean
isShape()
Is this variant instance of kindshape
?boolean
Is this variant instance of kindsimple_query_string
?boolean
Is this variant instance of kindspan_containing
?boolean
Is this variant instance of kindspan_first
?boolean
Is this variant instance of kindspan_multi
?boolean
Is this variant instance of kindspan_near
?boolean
Is this variant instance of kindspan_not
?boolean
isSpanOr()
Is this variant instance of kindspan_or
?boolean
Is this variant instance of kindspan_term
?boolean
Is this variant instance of kindspan_within
?boolean
isTerm()
Is this variant instance of kindterm
?boolean
isTerms()
Is this variant instance of kindterms
?boolean
Is this variant instance of kindterms_set
?boolean
isType()
Is this variant instance of kindtype
?boolean
Is this variant instance of kindwildcard
?boolean
Is this variant instance of kindwrapper
?match()
Get thematch
variant value.matchAll()
Get thematch_all
variant value.Get thematch_bool_prefix
variant value.Get thematch_none
variant value.Get thematch_phrase
variant value.Get thematch_phrase_prefix
variant value.Get themore_like_this
variant value.Get themulti_match
variant value.nested()
Get thenested
variant value.static Query
parentId()
Get theparent_id
variant value.Get thepercolate
variant value.pinned()
Get thepinned
variant value.prefix()
Get theprefix
variant value.Get thequery_string
variant value.range()
Get therange
variant value.Get therank_feature
variant value.regexp()
Get theregexp
variant value.script()
Get thescript
variant value.Get thescript_score
variant value.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
shape()
Get theshape
variant value.Get thesimple_query_string
variant value.Get thespan_containing
variant value.Get thespan_first
variant value.Get thespan_multi
variant value.spanNear()
Get thespan_near
variant value.spanNot()
Get thespan_not
variant value.spanOr()
Get thespan_or
variant value.spanTerm()
Get thespan_term
variant value.Get thespan_within
variant value.term()
Get theterm
variant value.terms()
Get theterms
variant value.termsSet()
Get theterms_set
variant value.toString()
type()
Get thetype
variant value.wildcard()
Get thewildcard
variant value.wrapper()
Get thewrapper
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
_aggregationKind
in interfaceAggregationVariant
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<Query.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<Query.Kind,
Object>
-
of
-
isBool
public boolean isBool()Is this variant instance of kindbool
? -
bool
Get thebool
variant value.- Throws:
IllegalStateException
- if the current variant is not of thebool
kind.
-
isBoosting
public boolean isBoosting()Is this variant instance of kindboosting
? -
boosting
Get theboosting
variant value.- Throws:
IllegalStateException
- if the current variant is not of theboosting
kind.
-
isCommon
public boolean isCommon()Is this variant instance of kindcommon
? -
common
Get thecommon
variant value.- Throws:
IllegalStateException
- if the current variant is not of thecommon
kind.
-
isCombinedFields
public boolean isCombinedFields()Is this variant instance of kindcombined_fields
? -
combinedFields
Get thecombined_fields
variant value.- Throws:
IllegalStateException
- if the current variant is not of thecombined_fields
kind.
-
isConstantScore
public boolean isConstantScore()Is this variant instance of kindconstant_score
? -
constantScore
Get theconstant_score
variant value.- Throws:
IllegalStateException
- if the current variant is not of theconstant_score
kind.
-
isDisMax
public boolean isDisMax()Is this variant instance of kinddis_max
? -
disMax
Get thedis_max
variant value.- Throws:
IllegalStateException
- if the current variant is not of thedis_max
kind.
-
isDistanceFeature
public boolean isDistanceFeature()Is this variant instance of kinddistance_feature
? -
distanceFeature
Get thedistance_feature
variant value.- Throws:
IllegalStateException
- if the current variant is not of thedistance_feature
kind.
-
isExists
public boolean isExists()Is this variant instance of kindexists
? -
exists
Get theexists
variant value.- Throws:
IllegalStateException
- if the current variant is not of theexists
kind.
-
isFunctionScore
public boolean isFunctionScore()Is this variant instance of kindfunction_score
? -
functionScore
Get thefunction_score
variant value.- Throws:
IllegalStateException
- if the current variant is not of thefunction_score
kind.
-
isFuzzy
public boolean isFuzzy()Is this variant instance of kindfuzzy
? -
fuzzy
Get thefuzzy
variant value.- Throws:
IllegalStateException
- if the current variant is not of thefuzzy
kind.
-
isGeoBoundingBox
public boolean isGeoBoundingBox()Is this variant instance of kindgeo_bounding_box
? -
geoBoundingBox
Get thegeo_bounding_box
variant value.- Throws:
IllegalStateException
- if the current variant is not of thegeo_bounding_box
kind.
-
isGeoDistance
public boolean isGeoDistance()Is this variant instance of kindgeo_distance
? -
geoDistance
Get thegeo_distance
variant value.- Throws:
IllegalStateException
- if the current variant is not of thegeo_distance
kind.
-
isGeoPolygon
public boolean isGeoPolygon()Is this variant instance of kindgeo_polygon
? -
geoPolygon
Get thegeo_polygon
variant value.- Throws:
IllegalStateException
- if the current variant is not of thegeo_polygon
kind.
-
isGeoShape
public boolean isGeoShape()Is this variant instance of kindgeo_shape
? -
geoShape
Get thegeo_shape
variant value.- Throws:
IllegalStateException
- if the current variant is not of thegeo_shape
kind.
-
isHasChild
public boolean isHasChild()Is this variant instance of kindhas_child
? -
hasChild
Get thehas_child
variant value.- Throws:
IllegalStateException
- if the current variant is not of thehas_child
kind.
-
isHasParent
public boolean isHasParent()Is this variant instance of kindhas_parent
? -
hasParent
Get thehas_parent
variant value.- Throws:
IllegalStateException
- if the current variant is not of thehas_parent
kind.
-
isIds
public boolean isIds()Is this variant instance of kindids
? -
ids
Get theids
variant value.- Throws:
IllegalStateException
- if the current variant is not of theids
kind.
-
isIntervals
public boolean isIntervals()Is this variant instance of kindintervals
? -
intervals
Get theintervals
variant value.- Throws:
IllegalStateException
- if the current variant is not of theintervals
kind.
-
isMatch
public boolean isMatch()Is this variant instance of kindmatch
? -
match
Get thematch
variant value.- Throws:
IllegalStateException
- if the current variant is not of thematch
kind.
-
isMatchAll
public boolean isMatchAll()Is this variant instance of kindmatch_all
? -
matchAll
Get thematch_all
variant value.- Throws:
IllegalStateException
- if the current variant is not of thematch_all
kind.
-
isMatchBoolPrefix
public boolean isMatchBoolPrefix()Is this variant instance of kindmatch_bool_prefix
? -
matchBoolPrefix
Get thematch_bool_prefix
variant value.- Throws:
IllegalStateException
- if the current variant is not of thematch_bool_prefix
kind.
-
isMatchNone
public boolean isMatchNone()Is this variant instance of kindmatch_none
? -
matchNone
Get thematch_none
variant value.- Throws:
IllegalStateException
- if the current variant is not of thematch_none
kind.
-
isMatchPhrase
public boolean isMatchPhrase()Is this variant instance of kindmatch_phrase
? -
matchPhrase
Get thematch_phrase
variant value.- Throws:
IllegalStateException
- if the current variant is not of thematch_phrase
kind.
-
isMatchPhrasePrefix
public boolean isMatchPhrasePrefix()Is this variant instance of kindmatch_phrase_prefix
? -
matchPhrasePrefix
Get thematch_phrase_prefix
variant value.- Throws:
IllegalStateException
- if the current variant is not of thematch_phrase_prefix
kind.
-
isMoreLikeThis
public boolean isMoreLikeThis()Is this variant instance of kindmore_like_this
? -
moreLikeThis
Get themore_like_this
variant value.- Throws:
IllegalStateException
- if the current variant is not of themore_like_this
kind.
-
isMultiMatch
public boolean isMultiMatch()Is this variant instance of kindmulti_match
? -
multiMatch
Get themulti_match
variant value.- Throws:
IllegalStateException
- if the current variant is not of themulti_match
kind.
-
isNested
public boolean isNested()Is this variant instance of kindnested
? -
nested
Get thenested
variant value.- Throws:
IllegalStateException
- if the current variant is not of thenested
kind.
-
isParentId
public boolean isParentId()Is this variant instance of kindparent_id
? -
parentId
Get theparent_id
variant value.- Throws:
IllegalStateException
- if the current variant is not of theparent_id
kind.
-
isPercolate
public boolean isPercolate()Is this variant instance of kindpercolate
? -
percolate
Get thepercolate
variant value.- Throws:
IllegalStateException
- if the current variant is not of thepercolate
kind.
-
isPinned
public boolean isPinned()Is this variant instance of kindpinned
? -
pinned
Get thepinned
variant value.- Throws:
IllegalStateException
- if the current variant is not of thepinned
kind.
-
isPrefix
public boolean isPrefix()Is this variant instance of kindprefix
? -
prefix
Get theprefix
variant value.- Throws:
IllegalStateException
- if the current variant is not of theprefix
kind.
-
isQueryString
public boolean isQueryString()Is this variant instance of kindquery_string
? -
queryString
Get thequery_string
variant value.- Throws:
IllegalStateException
- if the current variant is not of thequery_string
kind.
-
isRange
public boolean isRange()Is this variant instance of kindrange
? -
range
Get therange
variant value.- Throws:
IllegalStateException
- if the current variant is not of therange
kind.
-
isRankFeature
public boolean isRankFeature()Is this variant instance of kindrank_feature
? -
rankFeature
Get therank_feature
variant value.- Throws:
IllegalStateException
- if the current variant is not of therank_feature
kind.
-
isRegexp
public boolean isRegexp()Is this variant instance of kindregexp
? -
regexp
Get theregexp
variant value.- Throws:
IllegalStateException
- if the current variant is not of theregexp
kind.
-
isScript
public boolean isScript()Is this variant instance of kindscript
? -
script
Get thescript
variant value.- Throws:
IllegalStateException
- if the current variant is not of thescript
kind.
-
isScriptScore
public boolean isScriptScore()Is this variant instance of kindscript_score
? -
scriptScore
Get thescript_score
variant value.- Throws:
IllegalStateException
- if the current variant is not of thescript_score
kind.
-
isShape
public boolean isShape()Is this variant instance of kindshape
? -
shape
Get theshape
variant value.- Throws:
IllegalStateException
- if the current variant is not of theshape
kind.
-
isSimpleQueryString
public boolean isSimpleQueryString()Is this variant instance of kindsimple_query_string
? -
simpleQueryString
Get thesimple_query_string
variant value.- Throws:
IllegalStateException
- if the current variant is not of thesimple_query_string
kind.
-
isSpanContaining
public boolean isSpanContaining()Is this variant instance of kindspan_containing
? -
spanContaining
Get thespan_containing
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_containing
kind.
-
isFieldMaskingSpan
public boolean isFieldMaskingSpan()Is this variant instance of kindfield_masking_span
? -
fieldMaskingSpan
Get thefield_masking_span
variant value.- Throws:
IllegalStateException
- if the current variant is not of thefield_masking_span
kind.
-
isSpanFirst
public boolean isSpanFirst()Is this variant instance of kindspan_first
? -
spanFirst
Get thespan_first
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_first
kind.
-
isSpanMulti
public boolean isSpanMulti()Is this variant instance of kindspan_multi
? -
spanMulti
Get thespan_multi
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_multi
kind.
-
isSpanNear
public boolean isSpanNear()Is this variant instance of kindspan_near
? -
spanNear
Get thespan_near
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_near
kind.
-
isSpanNot
public boolean isSpanNot()Is this variant instance of kindspan_not
? -
spanNot
Get thespan_not
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_not
kind.
-
isSpanOr
public boolean isSpanOr()Is this variant instance of kindspan_or
? -
spanOr
Get thespan_or
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_or
kind.
-
isSpanTerm
public boolean isSpanTerm()Is this variant instance of kindspan_term
? -
spanTerm
Get thespan_term
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_term
kind.
-
isSpanWithin
public boolean isSpanWithin()Is this variant instance of kindspan_within
? -
spanWithin
Get thespan_within
variant value.- Throws:
IllegalStateException
- if the current variant is not of thespan_within
kind.
-
isTerm
public boolean isTerm()Is this variant instance of kindterm
? -
term
Get theterm
variant value.- Throws:
IllegalStateException
- if the current variant is not of theterm
kind.
-
isTerms
public boolean isTerms()Is this variant instance of kindterms
? -
terms
Get theterms
variant value.- Throws:
IllegalStateException
- if the current variant is not of theterms
kind.
-
isTermsSet
public boolean isTermsSet()Is this variant instance of kindterms_set
? -
termsSet
Get theterms_set
variant value.- Throws:
IllegalStateException
- if the current variant is not of theterms_set
kind.
-
isWildcard
public boolean isWildcard()Is this variant instance of kindwildcard
? -
wildcard
Get thewildcard
variant value.- Throws:
IllegalStateException
- if the current variant is not of thewildcard
kind.
-
isWrapper
public boolean isWrapper()Is this variant instance of kindwrapper
? -
wrapper
Get thewrapper
variant value.- Throws:
IllegalStateException
- if the current variant is not of thewrapper
kind.
-
isType
public boolean isType()Is this variant instance of kindtype
? -
type
Get thetype
variant value.- Throws:
IllegalStateException
- if the current variant is not of thetype
kind.
-
_isCustom
public boolean _isCustom()Is this a customQuery
defined by a plugin? -
_customKind
Get the actual kind when_kind()
equalsQuery.Kind._Custom
(plugin-defined variant).- Specified by:
_customKind
in interfaceOpenTaggedUnion<Query.Kind,
Object>
-
_custom
Get the custom plugin-defined variant value.- Throws:
IllegalStateException
- if the current variant is notQuery.Kind._Custom
.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
setupQueryDeserializer
-