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:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Query.Builder
static class
Query.Kind
Query
variant 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.BoolQuery
bool()
Get thebool
variant value.BoostingQuery
boosting()
Get theboosting
variant value.CombinedFieldsQuery
combinedFields()
Get thecombined_fields
variant value.CommonTermsQuery
common()
Get thecommon
variant value.ConstantScoreQuery
constantScore()
Get theconstant_score
variant value.DisMaxQuery
disMax()
Get thedis_max
variant value.DistanceFeatureQuery
distanceFeature()
Get thedistance_feature
variant value.ExistsQuery
exists()
Get theexists
variant value.SpanFieldMaskingQuery
fieldMaskingSpan()
Get thefield_masking_span
variant value.FunctionScoreQuery
functionScore()
Get thefunction_score
variant value.FuzzyQuery
fuzzy()
Get thefuzzy
variant value.GeoBoundingBoxQuery
geoBoundingBox()
Get thegeo_bounding_box
variant value.GeoDistanceQuery
geoDistance()
Get thegeo_distance
variant value.GeoPolygonQuery
geoPolygon()
Get thegeo_polygon
variant value.GeoShapeQuery
geoShape()
Get thegeo_shape
variant value.HasChildQuery
hasChild()
Get thehas_child
variant value.HasParentQuery
hasParent()
Get thehas_parent
variant value.IdsQuery
ids()
Get theids
variant value.IntervalsQuery
intervals()
Get theintervals
variant value.boolean
isBool()
Is this variant instance of kindbool
?boolean
isBoosting()
Is this variant instance of kindboosting
?boolean
isCombinedFields()
Is this variant instance of kindcombined_fields
?boolean
isCommon()
Is this variant instance of kindcommon
?boolean
isConstantScore()
Is this variant instance of kindconstant_score
?boolean
isDisMax()
Is this variant instance of kinddis_max
?boolean
isDistanceFeature()
Is this variant instance of kinddistance_feature
?boolean
isExists()
Is this variant instance of kindexists
?boolean
isFieldMaskingSpan()
Is this variant instance of kindfield_masking_span
?boolean
isFunctionScore()
Is this variant instance of kindfunction_score
?boolean
isFuzzy()
Is this variant instance of kindfuzzy
?boolean
isGeoBoundingBox()
Is this variant instance of kindgeo_bounding_box
?boolean
isGeoDistance()
Is this variant instance of kindgeo_distance
?boolean
isGeoPolygon()
Is this variant instance of kindgeo_polygon
?boolean
isGeoShape()
Is this variant instance of kindgeo_shape
?boolean
isHasChild()
Is this variant instance of kindhas_child
?boolean
isHasParent()
Is this variant instance of kindhas_parent
?boolean
isIds()
Is this variant instance of kindids
?boolean
isIntervals()
Is this variant instance of kindintervals
?boolean
isMatch()
Is this variant instance of kindmatch
?boolean
isMatchAll()
Is this variant instance of kindmatch_all
?boolean
isMatchBoolPrefix()
Is this variant instance of kindmatch_bool_prefix
?boolean
isMatchNone()
Is this variant instance of kindmatch_none
?boolean
isMatchPhrase()
Is this variant instance of kindmatch_phrase
?boolean
isMatchPhrasePrefix()
Is this variant instance of kindmatch_phrase_prefix
?boolean
isMoreLikeThis()
Is this variant instance of kindmore_like_this
?boolean
isMultiMatch()
Is this variant instance of kindmulti_match
?boolean
isNested()
Is this variant instance of kindnested
?boolean
isParentId()
Is this variant instance of kindparent_id
?boolean
isPercolate()
Is this variant instance of kindpercolate
?boolean
isPinned()
Is this variant instance of kindpinned
?boolean
isPrefix()
Is this variant instance of kindprefix
?boolean
isQueryString()
Is this variant instance of kindquery_string
?boolean
isRange()
Is this variant instance of kindrange
?boolean
isRankFeature()
Is this variant instance of kindrank_feature
?boolean
isRegexp()
Is this variant instance of kindregexp
?boolean
isScript()
Is this variant instance of kindscript
?boolean
isScriptScore()
Is this variant instance of kindscript_score
?boolean
isShape()
Is this variant instance of kindshape
?boolean
isSimpleQueryString()
Is this variant instance of kindsimple_query_string
?boolean
isSpanContaining()
Is this variant instance of kindspan_containing
?boolean
isSpanFirst()
Is this variant instance of kindspan_first
?boolean
isSpanMulti()
Is this variant instance of kindspan_multi
?boolean
isSpanNear()
Is this variant instance of kindspan_near
?boolean
isSpanNot()
Is this variant instance of kindspan_not
?boolean
isSpanOr()
Is this variant instance of kindspan_or
?boolean
isSpanTerm()
Is this variant instance of kindspan_term
?boolean
isSpanWithin()
Is this variant instance of kindspan_within
?boolean
isTerm()
Is this variant instance of kindterm
?boolean
isTerms()
Is this variant instance of kindterms
?boolean
isTermsSet()
Is this variant instance of kindterms_set
?boolean
isType()
Is this variant instance of kindtype
?boolean
isWildcard()
Is this variant instance of kindwildcard
?boolean
isWrapper()
Is this variant instance of kindwrapper
?MatchQuery
match()
Get thematch
variant value.MatchAllQuery
matchAll()
Get thematch_all
variant value.MatchBoolPrefixQuery
matchBoolPrefix()
Get thematch_bool_prefix
variant value.MatchNoneQuery
matchNone()
Get thematch_none
variant value.MatchPhraseQuery
matchPhrase()
Get thematch_phrase
variant value.MatchPhrasePrefixQuery
matchPhrasePrefix()
Get thematch_phrase_prefix
variant value.MoreLikeThisQuery
moreLikeThis()
Get themore_like_this
variant value.MultiMatchQuery
multiMatch()
Get themulti_match
variant value.NestedQuery
nested()
Get thenested
variant value.static Query
of(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
ParentIdQuery
parentId()
Get theparent_id
variant value.PercolateQuery
percolate()
Get thepercolate
variant value.PinnedQuery
pinned()
Get thepinned
variant value.PrefixQuery
prefix()
Get theprefix
variant value.QueryStringQuery
queryString()
Get thequery_string
variant value.RangeQuery
range()
Get therange
variant value.RankFeatureQuery
rankFeature()
Get therank_feature
variant value.RegexpQuery
regexp()
Get theregexp
variant value.ScriptQuery
script()
Get thescript
variant value.ScriptScoreQuery
scriptScore()
Get thescript_score
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupQueryDeserializer(ObjectDeserializer<Query.Builder> op)
ShapeQuery
shape()
Get theshape
variant value.SimpleQueryStringQuery
simpleQueryString()
Get thesimple_query_string
variant value.SpanContainingQuery
spanContaining()
Get thespan_containing
variant value.SpanFirstQuery
spanFirst()
Get thespan_first
variant value.SpanMultiTermQuery
spanMulti()
Get thespan_multi
variant value.SpanNearQuery
spanNear()
Get thespan_near
variant value.SpanNotQuery
spanNot()
Get thespan_not
variant value.SpanOrQuery
spanOr()
Get thespan_or
variant value.SpanTermQuery
spanTerm()
Get thespan_term
variant value.SpanWithinQuery
spanWithin()
Get thespan_within
variant value.TermQuery
term()
Get theterm
variant value.TermsQuery
terms()
Get theterms
variant value.TermsSetQuery
termsSet()
Get theterms_set
variant value.TypeQuery
type()
Get thetype
variant value.WildcardQuery
wildcard()
Get thewildcard
variant value.WrapperQuery
wrapper()
Get thewrapper
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<Query.Kind,java.lang.Object>
-
of
-
isBool
public boolean isBool()Is this variant instance of kindbool
? -
bool
Get thebool
variant value.- Throws:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.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:
java.lang.IllegalStateException
- if the current variant is not of thetype
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
setupQueryDeserializer
-