Package org.elasticsearch.index.query
Class QueryBuilders
java.lang.Object
org.elasticsearch.index.query.QueryBuilders
Utility class to create search queries.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BoolQueryBuilder
A Query that matches documents matching boolean combinations of other queries.static BoostingQueryBuilder
boostingQuery(QueryBuilder positiveQuery, QueryBuilder negativeQuery)
The BoostingQuery class can be used to effectively demote results that match a given query.static CombinedFieldsQueryBuilder
combinedFieldsQuery(Object text, String... fieldNames)
Creates a combined fields query for the provided field names and text.static CommonTermsQueryBuilder
commonTermsQuery(String fieldName, Object text)
Deprecated.static ConstantScoreQueryBuilder
constantScoreQuery(QueryBuilder queryBuilder)
A query that wraps another query and simply returns a constant score equal to the query boost for every document in the query.static DisMaxQueryBuilder
A query that generates the union of documents produced by its sub-queries, and that scores each document with the maximum score for that document as produced by any sub-query, plus a tie breaking increment for any additional matching sub-queries.static DistanceFeatureQueryBuilder
distanceFeatureQuery(String name, DistanceFeatureQueryBuilder.Origin origin, String pivot)
A query to boost scores based on their proximity to the given origin for date, date_nanos and geo_point field types.static ExistsQueryBuilder
existsQuery(String name)
A filter to filter only documents where a field exists in them.static FieldMaskingSpanQueryBuilder
fieldMaskingSpanQuery(SpanQueryBuilder query, String field)
static FunctionScoreQueryBuilder
functionScoreQuery(FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders)
A query that allows to define a custom scoring functionstatic FunctionScoreQueryBuilder
functionScoreQuery(ScoreFunctionBuilder function)
A query that allows to define a custom scoring function.static FunctionScoreQueryBuilder
functionScoreQuery(QueryBuilder queryBuilder)
A function_score query with no functions.static FunctionScoreQueryBuilder
functionScoreQuery(QueryBuilder queryBuilder, FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders)
A query that allows to define a custom scoring functionstatic FunctionScoreQueryBuilder
functionScoreQuery(QueryBuilder queryBuilder, ScoreFunctionBuilder function)
A query that allows to define a custom scoring function.static FuzzyQueryBuilder
fuzzyQuery(String name, Object value)
A Query that matches documents using fuzzy query.static FuzzyQueryBuilder
fuzzyQuery(String name, String value)
A Query that matches documents using fuzzy query.static GeoBoundingBoxQueryBuilder
geoBoundingBoxQuery(String name)
A filter to filter based on a bounding box defined by top left and bottom right locations / pointsstatic GeoShapeQueryBuilder
geoDisjointQuery(String name, String indexedShapeId)
static GeoShapeQueryBuilder
geoDisjointQuery(String name, String indexedShapeId, String indexedShapeType)
Deprecated.Types are in the process of being removed, usegeoDisjointQuery(String, String)
instead.static GeoShapeQueryBuilder
geoDisjointQuery(String name, ShapeBuilder shape)
Deprecated.usegeoDisjointQuery(String, Geometry)
insteadstatic GeoShapeQueryBuilder
geoDisjointQuery(String name, org.elasticsearch.geometry.Geometry shape)
A filter to filter indexed shapes that are not intersection with the query shapestatic GeoDistanceQueryBuilder
geoDistanceQuery(String name)
A filter to filter based on a specific distance from a specific geo location / point.static GeoShapeQueryBuilder
geoIntersectionQuery(String name, String indexedShapeId)
static GeoShapeQueryBuilder
geoIntersectionQuery(String name, String indexedShapeId, String indexedShapeType)
Deprecated.Types are in the process of being removed, usegeoIntersectionQuery(String, String)
instead.static GeoShapeQueryBuilder
geoIntersectionQuery(String name, ShapeBuilder shape)
Deprecated.usegeoIntersectionQuery(String, Geometry)
insteadstatic GeoShapeQueryBuilder
geoIntersectionQuery(String name, org.elasticsearch.geometry.Geometry shape)
A filter to filter indexed shapes intersecting with shapesstatic GeoPolygonQueryBuilder
geoPolygonQuery(String name, List<GeoPoint> points)
Deprecated.usegeoIntersectionQuery(String, Geometry)
insteadstatic GeoShapeQueryBuilder
geoShapeQuery(String name, String indexedShapeId)
static GeoShapeQueryBuilder
geoShapeQuery(String name, String indexedShapeId, String indexedShapeType)
Deprecated.Types are in the process of being removed, usegeoShapeQuery(String, String)
instead.static GeoShapeQueryBuilder
geoShapeQuery(String name, ShapeBuilder shape)
Deprecated.usegeoShapeQuery(String, Geometry)
insteadstatic GeoShapeQueryBuilder
geoShapeQuery(String name, org.elasticsearch.geometry.Geometry shape)
A filter based on the relationship of a shape and indexed shapesstatic GeoShapeQueryBuilder
geoWithinQuery(String name, String indexedShapeId)
static GeoShapeQueryBuilder
geoWithinQuery(String name, String indexedShapeId, String indexedShapeType)
Deprecated.Types are in the process of being removed, usegeoWithinQuery(String, String)
instead.static GeoShapeQueryBuilder
geoWithinQuery(String name, ShapeBuilder shape)
Deprecated.usegeoWithinQuery(String, Geometry)
insteadstatic GeoShapeQueryBuilder
geoWithinQuery(String name, org.elasticsearch.geometry.Geometry shape)
A filter to filter indexed shapes that are contained by a shapestatic IdsQueryBuilder
idsQuery()
Constructs a query that will match only specific ids within all types.static IdsQueryBuilder
Deprecated.Types are in the process of being removed, useidsQuery()
instead.static MatchAllQueryBuilder
A query that matches on all documents.static MatchBoolPrefixQueryBuilder
matchBoolPrefixQuery(String name, Object text)
Creates a text query with type "BOOL_PREFIX" for the provided field name and text.matchPhrasePrefixQuery(String name, Object text)
Creates a match query with type "PHRASE_PREFIX" for the provided field name and text.static MatchPhraseQueryBuilder
matchPhraseQuery(String name, Object text)
Creates a text query with type "PHRASE" for the provided field name and text.static MatchQueryBuilder
matchQuery(String name, Object text)
Creates a match query with type "BOOLEAN" for the provided field name and text.static MoreLikeThisQueryBuilder
moreLikeThisQuery(String[] likeTexts)
A more like this query that finds documents that are "like" the provided texts which is checked against the "_all" field.static MoreLikeThisQueryBuilder
moreLikeThisQuery(String[] fields, String[] likeTexts, MoreLikeThisQueryBuilder.Item[] likeItems)
A more like this query that finds documents that are "like" the provided texts or documents which is checked against the fields the query is constructed with.static MoreLikeThisQueryBuilder
moreLikeThisQuery(String[] likeTexts, MoreLikeThisQueryBuilder.Item[] likeItems)
A more like this query that finds documents that are "like" the provided texts or documents which is checked against the "_all" field.static MoreLikeThisQueryBuilder
moreLikeThisQuery(MoreLikeThisQueryBuilder.Item[] likeItems)
A more like this query that finds documents that are "like" the provided documents which is checked against the "_all" field.static MultiMatchQueryBuilder
multiMatchQuery(Object text, String... fieldNames)
Creates a match query with type "BOOLEAN" for the provided field name and text.static NestedQueryBuilder
nestedQuery(String path, QueryBuilder query, org.apache.lucene.search.join.ScoreMode scoreMode)
static PrefixQueryBuilder
prefixQuery(String name, String prefix)
A Query that matches documents containing terms with a specified prefix.static QueryStringQueryBuilder
queryStringQuery(String queryString)
A query that parses a query string and runs it.static RangeQueryBuilder
rangeQuery(String name)
A Query that matches documents within an range of terms.static RegexpQueryBuilder
regexpQuery(String name, String regexp)
A Query that matches documents containing terms with a specified regular expression.static ScriptQueryBuilder
scriptQuery(Script script)
A builder for filter based on a script.static ScriptScoreQueryBuilder
scriptScoreQuery(QueryBuilder queryBuilder, Script script)
A query that allows to define a custom scoring function through script.static SimpleQueryStringBuilder
simpleQueryStringQuery(String queryString)
A query that acts similar to a query_string query, but won't throw exceptions for any weird string syntax.static SpanContainingQueryBuilder
spanContainingQuery(SpanQueryBuilder big, SpanQueryBuilder little)
Creates a newspan_containing
builder.static SpanFirstQueryBuilder
spanFirstQuery(SpanQueryBuilder match, int end)
static SpanMultiTermQueryBuilder
spanMultiTermQueryBuilder(MultiTermQueryBuilder multiTermQueryBuilder)
Creates aSpanQueryBuilder
which allows having a sub query which implementsMultiTermQueryBuilder
.static SpanNearQueryBuilder
spanNearQuery(SpanQueryBuilder initialClause, int slop)
static SpanNotQueryBuilder
spanNotQuery(SpanQueryBuilder include, SpanQueryBuilder exclude)
static SpanOrQueryBuilder
spanOrQuery(SpanQueryBuilder initialClause)
static SpanTermQueryBuilder
spanTermQuery(String name, double value)
static SpanTermQueryBuilder
spanTermQuery(String name, float value)
static SpanTermQueryBuilder
spanTermQuery(String name, int value)
static SpanTermQueryBuilder
spanTermQuery(String name, long value)
static SpanTermQueryBuilder
spanTermQuery(String name, String value)
static SpanWithinQueryBuilder
spanWithinQuery(SpanQueryBuilder big, SpanQueryBuilder little)
Creates a newspan_within
builder.static TermQueryBuilder
A Query that matches documents containing a term.static TermQueryBuilder
A Query that matches documents containing a term.static TermQueryBuilder
A Query that matches documents containing a term.static TermQueryBuilder
A Query that matches documents containing a term.static TermQueryBuilder
A Query that matches documents containing a term.static TermQueryBuilder
A Query that matches documents containing a term.static TermQueryBuilder
A Query that matches documents containing a term.static TermsQueryBuilder
termsLookupQuery(String name, TermsLookup termsLookup)
A terms query that can extract the terms from another doc in an index.static TermsQueryBuilder
termsQuery(String name, double... values)
A filter for a field based on several terms matching on any of them.static TermsQueryBuilder
termsQuery(String name, float... values)
A filter for a field based on several terms matching on any of them.static TermsQueryBuilder
termsQuery(String name, int... values)
A filter for a field based on several terms matching on any of them.static TermsQueryBuilder
termsQuery(String name, long... values)
A filter for a field based on several terms matching on any of them.static TermsQueryBuilder
termsQuery(String name, Object... values)
A filter for a field based on several terms matching on any of them.static TermsQueryBuilder
termsQuery(String name, String... values)
A filter for a field based on several terms matching on any of them.static TermsQueryBuilder
termsQuery(String name, Collection<?> values)
A filter for a field based on several terms matching on any of them.static TypeQueryBuilder
Deprecated.Types are going away, prefer filtering on a field.static WildcardQueryBuilder
wildcardQuery(String name, String query)
Implements the wildcard search query.static WrapperQueryBuilder
wrapperQuery(byte[] source)
A Query builder which allows building a query thanks to a JSON string or binary data.static WrapperQueryBuilder
wrapperQuery(String source)
A Query builder which allows building a query thanks to a JSON string or binary data.static WrapperQueryBuilder
wrapperQuery(BytesReference source)
A Query builder which allows building a query thanks to a JSON string or binary data.
-
Method Details
-
matchAllQuery
A query that matches on all documents. -
matchQuery
Creates a match query with type "BOOLEAN" for the provided field name and text.- Parameters:
name
- The field name.text
- The query text (to be analyzed).
-
commonTermsQuery
Deprecated.Creates a common query for the provided field name and text.- Parameters:
fieldName
- The field name.text
- The query text (to be analyzed).
-
multiMatchQuery
Creates a match query with type "BOOLEAN" for the provided field name and text.- Parameters:
fieldNames
- The field names.text
- The query text (to be analyzed).
-
matchBoolPrefixQuery
Creates a text query with type "BOOL_PREFIX" for the provided field name and text.- Parameters:
name
- The field name.text
- The query text (to be analyzed).
-
matchPhraseQuery
Creates a text query with type "PHRASE" for the provided field name and text.- Parameters:
name
- The field name.text
- The query text (to be analyzed).
-
matchPhrasePrefixQuery
Creates a match query with type "PHRASE_PREFIX" for the provided field name and text.- Parameters:
name
- The field name.text
- The query text (to be analyzed).
-
disMaxQuery
A query that generates the union of documents produced by its sub-queries, and that scores each document with the maximum score for that document as produced by any sub-query, plus a tie breaking increment for any additional matching sub-queries. -
combinedFieldsQuery
Creates a combined fields query for the provided field names and text.- Parameters:
text
- The query text (to be analyzed).fieldNames
- The field names.
-
distanceFeatureQuery
public static DistanceFeatureQueryBuilder distanceFeatureQuery(String name, DistanceFeatureQueryBuilder.Origin origin, String pivot)A query to boost scores based on their proximity to the given origin for date, date_nanos and geo_point field types.- Parameters:
name
- The field nameorigin
- The origin of the distance calculation. Can be a long, string orGeoPoint
, depending on field type.pivot
- The distance from the origin at which relevance scores receive half of the boost value.
-
idsQuery
Constructs a query that will match only specific ids within all types. -
idsQuery
Deprecated.Types are in the process of being removed, useidsQuery()
instead.Constructs a query that will match only specific ids within types.- Parameters:
types
- The mapping/doc type
-
termQuery
A Query that matches documents containing a term.- Parameters:
name
- The name of the fieldvalue
- The value of the term
-
termQuery
A Query that matches documents containing a term.- Parameters:
name
- The name of the fieldvalue
- The value of the term
-
termQuery
A Query that matches documents containing a term.- Parameters:
name
- The name of the fieldvalue
- The value of the term
-
termQuery
A Query that matches documents containing a term.- Parameters:
name
- The name of the fieldvalue
- The value of the term
-
termQuery
A Query that matches documents containing a term.- Parameters:
name
- The name of the fieldvalue
- The value of the term
-
termQuery
A Query that matches documents containing a term.- Parameters:
name
- The name of the fieldvalue
- The value of the term
-
termQuery
A Query that matches documents containing a term.- Parameters:
name
- The name of the fieldvalue
- The value of the term
-
fuzzyQuery
A Query that matches documents using fuzzy query.- Parameters:
name
- The name of the fieldvalue
- The value of the term- See Also:
matchQuery(String, Object)
,rangeQuery(String)
-
fuzzyQuery
A Query that matches documents using fuzzy query.- Parameters:
name
- The name of the fieldvalue
- The value of the term- See Also:
matchQuery(String, Object)
,rangeQuery(String)
-
prefixQuery
A Query that matches documents containing terms with a specified prefix.- Parameters:
name
- The name of the fieldprefix
- The prefix query
-
rangeQuery
A Query that matches documents within an range of terms.- Parameters:
name
- The field name
-
wildcardQuery
Implements the wildcard search query. Supported wildcards are*
, which matches any character sequence (including the empty one), and?
, which matches any single character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow WildcardQueries, a Wildcard term should not start with one of the wildcards*
or?
. (The wildcard field type however, is optimised for leading wildcards)- Parameters:
name
- The field namequery
- The wildcard query string
-
regexpQuery
A Query that matches documents containing terms with a specified regular expression.- Parameters:
name
- The name of the fieldregexp
- The regular expression
-
queryStringQuery
A query that parses a query string and runs it. There are two modes that this operates. The first, when no field is added (usingQueryStringQueryBuilder.field(String)
, will run the query once and non prefixed fields will use theQueryStringQueryBuilder.defaultField(String)
set. The second, when one or more fields are added (usingQueryStringQueryBuilder.field(String)
), will run the parsed query against the provided fields, and combine them either using Dismax.- Parameters:
queryString
- The query string to run
-
simpleQueryStringQuery
A query that acts similar to a query_string query, but won't throw exceptions for any weird string syntax. SeeSimpleQueryParser
for the full supported syntax. -
boostingQuery
public static BoostingQueryBuilder boostingQuery(QueryBuilder positiveQuery, QueryBuilder negativeQuery)The BoostingQuery class can be used to effectively demote results that match a given query. Unlike the "NOT" clause, this still selects documents that contain undesirable terms, but reduces their overall score: -
boolQuery
A Query that matches documents matching boolean combinations of other queries. -
spanTermQuery
-
spanTermQuery
-
spanTermQuery
-
spanTermQuery
-
spanTermQuery
-
spanFirstQuery
-
spanNearQuery
-
spanNotQuery
-
spanOrQuery
-
spanWithinQuery
Creates a newspan_within
builder.- Parameters:
big
- the big clause, it must encloselittle
for a match.little
- the little clause, it must be contained withinbig
for a match.
-
spanContainingQuery
public static SpanContainingQueryBuilder spanContainingQuery(SpanQueryBuilder big, SpanQueryBuilder little)Creates a newspan_containing
builder.- Parameters:
big
- the big clause, it must encloselittle
for a match.little
- the little clause, it must be contained withinbig
for a match.
-
spanMultiTermQueryBuilder
public static SpanMultiTermQueryBuilder spanMultiTermQueryBuilder(MultiTermQueryBuilder multiTermQueryBuilder)Creates aSpanQueryBuilder
which allows having a sub query which implementsMultiTermQueryBuilder
. This is useful for having e.g. wildcard or fuzzy queries inside spans.- Parameters:
multiTermQueryBuilder
- TheMultiTermQueryBuilder
that backs the created builder.
-
fieldMaskingSpanQuery
public static FieldMaskingSpanQueryBuilder fieldMaskingSpanQuery(SpanQueryBuilder query, String field) -
constantScoreQuery
A query that wraps another query and simply returns a constant score equal to the query boost for every document in the query.- Parameters:
queryBuilder
- The query to wrap in a constant score query
-
functionScoreQuery
A function_score query with no functions.- Parameters:
queryBuilder
- The query to custom score- Returns:
- the function score query
-
functionScoreQuery
public static FunctionScoreQueryBuilder functionScoreQuery(QueryBuilder queryBuilder, FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders)A query that allows to define a custom scoring function- Parameters:
queryBuilder
- The query to custom scorefilterFunctionBuilders
- the filters and functions to execute- Returns:
- the function score query
-
functionScoreQuery
public static FunctionScoreQueryBuilder functionScoreQuery(FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders)A query that allows to define a custom scoring function- Parameters:
filterFunctionBuilders
- the filters and functions to execute- Returns:
- the function score query
-
functionScoreQuery
A query that allows to define a custom scoring function.- Parameters:
function
- The function builder used to custom score
-
functionScoreQuery
public static FunctionScoreQueryBuilder functionScoreQuery(QueryBuilder queryBuilder, ScoreFunctionBuilder function)A query that allows to define a custom scoring function.- Parameters:
queryBuilder
- The query to custom scorefunction
- The function builder used to custom score
-
scriptScoreQuery
A query that allows to define a custom scoring function through script.- Parameters:
queryBuilder
- The query to custom scorescript
- The script used to score the query
-
moreLikeThisQuery
public static MoreLikeThisQueryBuilder moreLikeThisQuery(String[] fields, String[] likeTexts, MoreLikeThisQueryBuilder.Item[] likeItems)A more like this query that finds documents that are "like" the provided texts or documents which is checked against the fields the query is constructed with.- Parameters:
fields
- the field names that will be used when generating the 'More Like This' query.likeTexts
- the text to use when generating the 'More Like This' query.likeItems
- the documents to use when generating the 'More Like This' query.
-
moreLikeThisQuery
public static MoreLikeThisQueryBuilder moreLikeThisQuery(String[] likeTexts, MoreLikeThisQueryBuilder.Item[] likeItems)A more like this query that finds documents that are "like" the provided texts or documents which is checked against the "_all" field.- Parameters:
likeTexts
- the text to use when generating the 'More Like This' query.likeItems
- the documents to use when generating the 'More Like This' query.
-
moreLikeThisQuery
A more like this query that finds documents that are "like" the provided texts which is checked against the "_all" field.- Parameters:
likeTexts
- the text to use when generating the 'More Like This' query.
-
moreLikeThisQuery
A more like this query that finds documents that are "like" the provided documents which is checked against the "_all" field.- Parameters:
likeItems
- the documents to use when generating the 'More Like This' query.
-
nestedQuery
public static NestedQueryBuilder nestedQuery(String path, QueryBuilder query, org.apache.lucene.search.join.ScoreMode scoreMode) -
termsQuery
A filter for a field based on several terms matching on any of them.- Parameters:
name
- The field namevalues
- The terms
-
termsQuery
A filter for a field based on several terms matching on any of them.- Parameters:
name
- The field namevalues
- The terms
-
termsQuery
A filter for a field based on several terms matching on any of them.- Parameters:
name
- The field namevalues
- The terms
-
termsQuery
A filter for a field based on several terms matching on any of them.- Parameters:
name
- The field namevalues
- The terms
-
termsQuery
A filter for a field based on several terms matching on any of them.- Parameters:
name
- The field namevalues
- The terms
-
termsQuery
A filter for a field based on several terms matching on any of them.- Parameters:
name
- The field namevalues
- The terms
-
termsQuery
A filter for a field based on several terms matching on any of them.- Parameters:
name
- The field namevalues
- The terms
-
wrapperQuery
A Query builder which allows building a query thanks to a JSON string or binary data. -
wrapperQuery
A Query builder which allows building a query thanks to a JSON string or binary data. -
wrapperQuery
A Query builder which allows building a query thanks to a JSON string or binary data. -
typeQuery
Deprecated.Types are going away, prefer filtering on a field.A filter based on doc/mapping type. -
termsLookupQuery
A terms query that can extract the terms from another doc in an index. -
scriptQuery
A builder for filter based on a script.- Parameters:
script
- The script to filter by.
-
geoDistanceQuery
A filter to filter based on a specific distance from a specific geo location / point.- Parameters:
name
- The location field name.
-
geoBoundingBoxQuery
A filter to filter based on a bounding box defined by top left and bottom right locations / points- Parameters:
name
- The location field name.
-
geoPolygonQuery
@Deprecated public static GeoPolygonQueryBuilder geoPolygonQuery(String name, List<GeoPoint> points)Deprecated.usegeoIntersectionQuery(String, Geometry)
insteadA filter to filter based on a polygon defined by a set of locations / points.- Parameters:
name
- The location field name.
-
geoShapeQuery
public static GeoShapeQueryBuilder geoShapeQuery(String name, org.elasticsearch.geometry.Geometry shape) throws IOExceptionA filter based on the relationship of a shape and indexed shapes- Parameters:
name
- The shape field nameshape
- Shape to use in the filter- Throws:
IOException
-
geoShapeQuery
@Deprecated public static GeoShapeQueryBuilder geoShapeQuery(String name, ShapeBuilder shape) throws IOExceptionDeprecated.usegeoShapeQuery(String, Geometry)
instead- Throws:
IOException
-
geoShapeQuery
-
geoShapeQuery
@Deprecated public static GeoShapeQueryBuilder geoShapeQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoShapeQuery(String, String)
instead. -
geoIntersectionQuery
public static GeoShapeQueryBuilder geoIntersectionQuery(String name, org.elasticsearch.geometry.Geometry shape) throws IOExceptionA filter to filter indexed shapes intersecting with shapes- Parameters:
name
- The shape field nameshape
- Shape to use in the filter- Throws:
IOException
-
geoIntersectionQuery
@Deprecated public static GeoShapeQueryBuilder geoIntersectionQuery(String name, ShapeBuilder shape) throws IOExceptionDeprecated.usegeoIntersectionQuery(String, Geometry)
instead- Throws:
IOException
-
geoIntersectionQuery
-
geoIntersectionQuery
@Deprecated public static GeoShapeQueryBuilder geoIntersectionQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoIntersectionQuery(String, String)
instead. -
geoWithinQuery
public static GeoShapeQueryBuilder geoWithinQuery(String name, org.elasticsearch.geometry.Geometry shape) throws IOExceptionA filter to filter indexed shapes that are contained by a shape- Parameters:
name
- The shape field nameshape
- Shape to use in the filter- Throws:
IOException
-
geoWithinQuery
@Deprecated public static GeoShapeQueryBuilder geoWithinQuery(String name, ShapeBuilder shape) throws IOExceptionDeprecated.usegeoWithinQuery(String, Geometry)
instead- Throws:
IOException
-
geoWithinQuery
-
geoWithinQuery
@Deprecated public static GeoShapeQueryBuilder geoWithinQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoWithinQuery(String, String)
instead. -
geoDisjointQuery
public static GeoShapeQueryBuilder geoDisjointQuery(String name, org.elasticsearch.geometry.Geometry shape) throws IOExceptionA filter to filter indexed shapes that are not intersection with the query shape- Parameters:
name
- The shape field nameshape
- Shape to use in the filter- Throws:
IOException
-
geoDisjointQuery
@Deprecated public static GeoShapeQueryBuilder geoDisjointQuery(String name, ShapeBuilder shape) throws IOExceptionDeprecated.usegeoDisjointQuery(String, Geometry)
instead- Throws:
IOException
-
geoDisjointQuery
-
geoDisjointQuery
@Deprecated public static GeoShapeQueryBuilder geoDisjointQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoDisjointQuery(String, String)
instead. -
existsQuery
A filter to filter only documents where a field exists in them.- Parameters:
name
- The name of the field
-
CommonTermsQueryBuilder