Class Query
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.Query
- All Implemented Interfaces:
AggregationVariant
,JsonpSerializable
,TaggedUnion<java.lang.Object>
,UnionVariant
@JsonpDeserializable public class Query extends java.lang.Object implements TaggedUnion<java.lang.Object>, AggregationVariant, JsonpSerializable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Query.Builder
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Query>
_DESERIALIZER
static java.lang.String
BOOL
static java.lang.String
BOOSTING
static java.lang.String
COMBINED_FIELDS
static java.lang.String
COMMON
static java.lang.String
CONSTANT_SCORE
static java.lang.String
DIS_MAX
static java.lang.String
DISTANCE_FEATURE
static java.lang.String
EXISTS
static java.lang.String
FIELD_MASKING_SPAN
static java.lang.String
FUNCTION_SCORE
static java.lang.String
FUZZY
static java.lang.String
GEO_BOUNDING_BOX
static java.lang.String
GEO_DISTANCE
static java.lang.String
GEO_POLYGON
static java.lang.String
GEO_SHAPE
static java.lang.String
HAS_CHILD
static java.lang.String
HAS_PARENT
static java.lang.String
IDS
static java.lang.String
INTERVALS
static java.lang.String
MATCH
static java.lang.String
MATCH_ALL
static java.lang.String
MATCH_BOOL_PREFIX
static java.lang.String
MATCH_NONE
static java.lang.String
MATCH_PHRASE
static java.lang.String
MATCH_PHRASE_PREFIX
static java.lang.String
MORE_LIKE_THIS
static java.lang.String
MULTI_MATCH
static java.lang.String
NESTED
static java.lang.String
PARENT_ID
static java.lang.String
PERCOLATE
static java.lang.String
PINNED
static java.lang.String
PREFIX
static java.lang.String
QUERY_STRING
static java.lang.String
RANGE
static java.lang.String
RANK_FEATURE
static java.lang.String
REGEXP
static java.lang.String
SCRIPT
static java.lang.String
SCRIPT_SCORE
static java.lang.String
SHAPE
static java.lang.String
SIMPLE_QUERY_STRING
static java.lang.String
SPAN_CONTAINING
static java.lang.String
SPAN_FIRST
static java.lang.String
SPAN_MULTI
static java.lang.String
SPAN_NEAR
static java.lang.String
SPAN_NOT
static java.lang.String
SPAN_OR
static java.lang.String
SPAN_TERM
static java.lang.String
SPAN_WITHIN
static java.lang.String
TERM
static java.lang.String
TERMS
static java.lang.String
TERMS_SET
static java.lang.String
TYPE
static java.lang.String
WILDCARD
-
Constructor Summary
Constructors Constructor Description Query(QueryVariant value)
Query(ObjectBuilder<T> builder)
Query(java.util.function.Function<Query.Builder,Query.Builder> fn)
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
java.lang.String
_type()
Get the of the type of the variant held by this union object.java.lang.String
_variantType()
Aggregation
variant typeBoolQuery
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.jakarta.json.JsonValue
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.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.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.jakarta.json.JsonValue
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(DelegatingDeserializer<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.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
Methods inherited from interface co.elastic.clients.util.TaggedUnion
_is
-
Field Details
-
BOOL
public static final java.lang.String BOOL- See Also:
- Constant Field Values
-
BOOSTING
public static final java.lang.String BOOSTING- See Also:
- Constant Field Values
-
COMMON
public static final java.lang.String COMMON- See Also:
- Constant Field Values
-
COMBINED_FIELDS
public static final java.lang.String COMBINED_FIELDS- See Also:
- Constant Field Values
-
CONSTANT_SCORE
public static final java.lang.String CONSTANT_SCORE- See Also:
- Constant Field Values
-
DIS_MAX
public static final java.lang.String DIS_MAX- See Also:
- Constant Field Values
-
DISTANCE_FEATURE
public static final java.lang.String DISTANCE_FEATURE- See Also:
- Constant Field Values
-
EXISTS
public static final java.lang.String EXISTS- See Also:
- Constant Field Values
-
FUNCTION_SCORE
public static final java.lang.String FUNCTION_SCORE- See Also:
- Constant Field Values
-
FUZZY
public static final java.lang.String FUZZY- See Also:
- Constant Field Values
-
GEO_BOUNDING_BOX
public static final java.lang.String GEO_BOUNDING_BOX- See Also:
- Constant Field Values
-
GEO_DISTANCE
public static final java.lang.String GEO_DISTANCE- See Also:
- Constant Field Values
-
GEO_POLYGON
public static final java.lang.String GEO_POLYGON- See Also:
- Constant Field Values
-
GEO_SHAPE
public static final java.lang.String GEO_SHAPE- See Also:
- Constant Field Values
-
HAS_CHILD
public static final java.lang.String HAS_CHILD- See Also:
- Constant Field Values
-
HAS_PARENT
public static final java.lang.String HAS_PARENT- See Also:
- Constant Field Values
-
IDS
public static final java.lang.String IDS- See Also:
- Constant Field Values
-
INTERVALS
public static final java.lang.String INTERVALS- See Also:
- Constant Field Values
-
MATCH
public static final java.lang.String MATCH- See Also:
- Constant Field Values
-
MATCH_ALL
public static final java.lang.String MATCH_ALL- See Also:
- Constant Field Values
-
MATCH_BOOL_PREFIX
public static final java.lang.String MATCH_BOOL_PREFIX- See Also:
- Constant Field Values
-
MATCH_NONE
public static final java.lang.String MATCH_NONE- See Also:
- Constant Field Values
-
MATCH_PHRASE
public static final java.lang.String MATCH_PHRASE- See Also:
- Constant Field Values
-
MATCH_PHRASE_PREFIX
public static final java.lang.String MATCH_PHRASE_PREFIX- See Also:
- Constant Field Values
-
MORE_LIKE_THIS
public static final java.lang.String MORE_LIKE_THIS- See Also:
- Constant Field Values
-
MULTI_MATCH
public static final java.lang.String MULTI_MATCH- See Also:
- Constant Field Values
-
NESTED
public static final java.lang.String NESTED- See Also:
- Constant Field Values
-
PARENT_ID
public static final java.lang.String PARENT_ID- See Also:
- Constant Field Values
-
PERCOLATE
public static final java.lang.String PERCOLATE- See Also:
- Constant Field Values
-
PINNED
public static final java.lang.String PINNED- See Also:
- Constant Field Values
-
PREFIX
public static final java.lang.String PREFIX- See Also:
- Constant Field Values
-
QUERY_STRING
public static final java.lang.String QUERY_STRING- See Also:
- Constant Field Values
-
RANGE
public static final java.lang.String RANGE- See Also:
- Constant Field Values
-
RANK_FEATURE
public static final java.lang.String RANK_FEATURE- See Also:
- Constant Field Values
-
REGEXP
public static final java.lang.String REGEXP- See Also:
- Constant Field Values
-
SCRIPT
public static final java.lang.String SCRIPT- See Also:
- Constant Field Values
-
SCRIPT_SCORE
public static final java.lang.String SCRIPT_SCORE- See Also:
- Constant Field Values
-
SHAPE
public static final java.lang.String SHAPE- See Also:
- Constant Field Values
-
SIMPLE_QUERY_STRING
public static final java.lang.String SIMPLE_QUERY_STRING- See Also:
- Constant Field Values
-
SPAN_CONTAINING
public static final java.lang.String SPAN_CONTAINING- See Also:
- Constant Field Values
-
FIELD_MASKING_SPAN
public static final java.lang.String FIELD_MASKING_SPAN- See Also:
- Constant Field Values
-
SPAN_FIRST
public static final java.lang.String SPAN_FIRST- See Also:
- Constant Field Values
-
SPAN_MULTI
public static final java.lang.String SPAN_MULTI- See Also:
- Constant Field Values
-
SPAN_NEAR
public static final java.lang.String SPAN_NEAR- See Also:
- Constant Field Values
-
SPAN_NOT
public static final java.lang.String SPAN_NOT- See Also:
- Constant Field Values
-
SPAN_OR
public static final java.lang.String SPAN_OR- See Also:
- Constant Field Values
-
SPAN_TERM
public static final java.lang.String SPAN_TERM- See Also:
- Constant Field Values
-
SPAN_WITHIN
public static final java.lang.String SPAN_WITHIN- See Also:
- Constant Field Values
-
TERM
public static final java.lang.String TERM- See Also:
- Constant Field Values
-
TERMS
public static final java.lang.String TERMS- See Also:
- Constant Field Values
-
TERMS_SET
public static final java.lang.String TERMS_SET- See Also:
- Constant Field Values
-
WILDCARD
public static final java.lang.String WILDCARD- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE- See Also:
- Constant Field Values
-
_DESERIALIZER
-
-
Constructor Details
-
Query
-
Query
-
Query
-
-
Method Details
-
_variantType
public java.lang.String _variantType()Aggregation
variant type- Specified by:
_variantType
in interfaceUnionVariant
-
_type
public java.lang.String _type()Description copied from interface:TaggedUnion
Get the of the type of the variant held by this union object.- Specified by:
_type
in interfaceTaggedUnion<java.lang.Object>
- Returns:
- the variant type
-
_get
public java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<java.lang.Object>
-
bool
Get thebool
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thebool
kind.
-
boosting
Get theboosting
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theboosting
kind.
-
common
Get thecommon
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecommon
kind.
-
combinedFields
Get thecombined_fields
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecombined_fields
kind.
-
constantScore
Get theconstant_score
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theconstant_score
kind.
-
disMax
Get thedis_max
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedis_max
kind.
-
distanceFeature
public jakarta.json.JsonValue distanceFeature()Get thedistance_feature
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedistance_feature
kind.
-
exists
Get theexists
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theexists
kind.
-
functionScore
Get thefunction_score
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefunction_score
kind.
-
fuzzy
Get thefuzzy
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefuzzy
kind.
-
geoBoundingBox
Get thegeo_bounding_box
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thegeo_bounding_box
kind.
-
geoDistance
Get thegeo_distance
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thegeo_distance
kind.
-
geoPolygon
Get thegeo_polygon
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thegeo_polygon
kind.
-
geoShape
Get thegeo_shape
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thegeo_shape
kind.
-
hasChild
Get thehas_child
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thehas_child
kind.
-
hasParent
Get thehas_parent
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thehas_parent
kind.
-
ids
Get theids
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theids
kind.
-
intervals
Get theintervals
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theintervals
kind.
-
match
Get thematch
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thematch
kind.
-
matchAll
Get thematch_all
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thematch_all
kind.
-
matchBoolPrefix
Get thematch_bool_prefix
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thematch_bool_prefix
kind.
-
matchNone
Get thematch_none
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thematch_none
kind.
-
matchPhrase
Get thematch_phrase
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thematch_phrase
kind.
-
matchPhrasePrefix
Get thematch_phrase_prefix
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thematch_phrase_prefix
kind.
-
moreLikeThis
Get themore_like_this
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of themore_like_this
kind.
-
multiMatch
Get themulti_match
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of themulti_match
kind.
-
nested
Get thenested
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thenested
kind.
-
parentId
Get theparent_id
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theparent_id
kind.
-
percolate
Get thepercolate
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepercolate
kind.
-
pinned
Get thepinned
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepinned
kind.
-
prefix
Get theprefix
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theprefix
kind.
-
queryString
Get thequery_string
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thequery_string
kind.
-
range
public jakarta.json.JsonValue range()Get therange
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of therange
kind.
-
rankFeature
Get therank_feature
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of therank_feature
kind.
-
regexp
Get theregexp
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theregexp
kind.
-
script
Get thescript
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thescript
kind.
-
scriptScore
Get thescript_score
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thescript_score
kind.
-
shape
Get theshape
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theshape
kind.
-
simpleQueryString
Get thesimple_query_string
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thesimple_query_string
kind.
-
spanContaining
Get thespan_containing
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_containing
kind.
-
fieldMaskingSpan
Get thefield_masking_span
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefield_masking_span
kind.
-
spanFirst
Get thespan_first
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_first
kind.
-
spanMulti
Get thespan_multi
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_multi
kind.
-
spanNear
Get thespan_near
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_near
kind.
-
spanNot
Get thespan_not
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_not
kind.
-
spanOr
Get thespan_or
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_or
kind.
-
spanTerm
Get thespan_term
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_term
kind.
-
spanWithin
Get thespan_within
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thespan_within
kind.
-
term
Get theterm
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theterm
kind.
-
terms
Get theterms
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theterms
kind.
-
termsSet
Get theterms_set
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theterms_set
kind.
-
wildcard
Get thewildcard
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thewildcard
kind.
-
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
-