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 BoolQueryBuilderA Query that matches documents matching boolean combinations of other queries.static BoostingQueryBuilderboostingQuery(QueryBuilder positiveQuery, QueryBuilder negativeQuery)The BoostingQuery class can be used to effectively demote results that match a given query.static CombinedFieldsQueryBuildercombinedFieldsQuery(Object text, String... fieldNames)Creates a combined fields query for the provided field names and text.static CommonTermsQueryBuildercommonTermsQuery(String fieldName, Object text)Deprecated.static ConstantScoreQueryBuilderconstantScoreQuery(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 DisMaxQueryBuilderA 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 DistanceFeatureQueryBuilderdistanceFeatureQuery(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 ExistsQueryBuilderexistsQuery(String name)A filter to filter only documents where a field exists in them.static FieldMaskingSpanQueryBuilderfieldMaskingSpanQuery(SpanQueryBuilder query, String field)static FunctionScoreQueryBuilderfunctionScoreQuery(FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders)A query that allows to define a custom scoring functionstatic FunctionScoreQueryBuilderfunctionScoreQuery(ScoreFunctionBuilder function)A query that allows to define a custom scoring function.static FunctionScoreQueryBuilderfunctionScoreQuery(QueryBuilder queryBuilder)A function_score query with no functions.static FunctionScoreQueryBuilderfunctionScoreQuery(QueryBuilder queryBuilder, FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders)A query that allows to define a custom scoring functionstatic FunctionScoreQueryBuilderfunctionScoreQuery(QueryBuilder queryBuilder, ScoreFunctionBuilder function)A query that allows to define a custom scoring function.static FuzzyQueryBuilderfuzzyQuery(String name, Object value)A Query that matches documents using fuzzy query.static FuzzyQueryBuilderfuzzyQuery(String name, String value)A Query that matches documents using fuzzy query.static GeoBoundingBoxQueryBuildergeoBoundingBoxQuery(String name)A filter to filter based on a bounding box defined by top left and bottom right locations / pointsstatic GeoShapeQueryBuildergeoDisjointQuery(String name, String indexedShapeId)static GeoShapeQueryBuildergeoDisjointQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoDisjointQuery(String, String)instead.static GeoShapeQueryBuildergeoDisjointQuery(String name, ShapeBuilder shape)Deprecated.usegeoDisjointQuery(String, Geometry)insteadstatic GeoShapeQueryBuildergeoDisjointQuery(String name, org.elasticsearch.geometry.Geometry shape)A filter to filter indexed shapes that are not intersection with the query shapestatic GeoDistanceQueryBuildergeoDistanceQuery(String name)A filter to filter based on a specific distance from a specific geo location / point.static GeoShapeQueryBuildergeoIntersectionQuery(String name, String indexedShapeId)static GeoShapeQueryBuildergeoIntersectionQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoIntersectionQuery(String, String)instead.static GeoShapeQueryBuildergeoIntersectionQuery(String name, ShapeBuilder shape)Deprecated.usegeoIntersectionQuery(String, Geometry)insteadstatic GeoShapeQueryBuildergeoIntersectionQuery(String name, org.elasticsearch.geometry.Geometry shape)A filter to filter indexed shapes intersecting with shapesstatic GeoPolygonQueryBuildergeoPolygonQuery(String name, List<GeoPoint> points)Deprecated.usegeoIntersectionQuery(String, Geometry)insteadstatic GeoShapeQueryBuildergeoShapeQuery(String name, String indexedShapeId)static GeoShapeQueryBuildergeoShapeQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoShapeQuery(String, String)instead.static GeoShapeQueryBuildergeoShapeQuery(String name, ShapeBuilder shape)Deprecated.usegeoShapeQuery(String, Geometry)insteadstatic GeoShapeQueryBuildergeoShapeQuery(String name, org.elasticsearch.geometry.Geometry shape)A filter based on the relationship of a shape and indexed shapesstatic GeoShapeQueryBuildergeoWithinQuery(String name, String indexedShapeId)static GeoShapeQueryBuildergeoWithinQuery(String name, String indexedShapeId, String indexedShapeType)Deprecated.Types are in the process of being removed, usegeoWithinQuery(String, String)instead.static GeoShapeQueryBuildergeoWithinQuery(String name, ShapeBuilder shape)Deprecated.usegeoWithinQuery(String, Geometry)insteadstatic GeoShapeQueryBuildergeoWithinQuery(String name, org.elasticsearch.geometry.Geometry shape)A filter to filter indexed shapes that are contained by a shapestatic IdsQueryBuilderidsQuery()Constructs a query that will match only specific ids within all types.static IdsQueryBuilderDeprecated.Types are in the process of being removed, useidsQuery()instead.static MatchAllQueryBuilderA query that matches on all documents.static MatchBoolPrefixQueryBuildermatchBoolPrefixQuery(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 MatchPhraseQueryBuildermatchPhraseQuery(String name, Object text)Creates a text query with type "PHRASE" for the provided field name and text.static MatchQueryBuildermatchQuery(String name, Object text)Creates a match query with type "BOOLEAN" for the provided field name and text.static MoreLikeThisQueryBuildermoreLikeThisQuery(String[] likeTexts)A more like this query that finds documents that are "like" the provided texts which is checked against the "_all" field.static MoreLikeThisQueryBuildermoreLikeThisQuery(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 MoreLikeThisQueryBuildermoreLikeThisQuery(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 MoreLikeThisQueryBuildermoreLikeThisQuery(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 MultiMatchQueryBuildermultiMatchQuery(Object text, String... fieldNames)Creates a match query with type "BOOLEAN" for the provided field name and text.static NestedQueryBuildernestedQuery(String path, QueryBuilder query, org.apache.lucene.search.join.ScoreMode scoreMode)static PrefixQueryBuilderprefixQuery(String name, String prefix)A Query that matches documents containing terms with a specified prefix.static QueryStringQueryBuilderqueryStringQuery(String queryString)A query that parses a query string and runs it.static RangeQueryBuilderrangeQuery(String name)A Query that matches documents within an range of terms.static RegexpQueryBuilderregexpQuery(String name, String regexp)A Query that matches documents containing terms with a specified regular expression.static ScriptQueryBuilderscriptQuery(Script script)A builder for filter based on a script.static ScriptScoreQueryBuilderscriptScoreQuery(QueryBuilder queryBuilder, Script script)A query that allows to define a custom scoring function through script.static SimpleQueryStringBuildersimpleQueryStringQuery(String queryString)A query that acts similar to a query_string query, but won't throw exceptions for any weird string syntax.static SpanContainingQueryBuilderspanContainingQuery(SpanQueryBuilder big, SpanQueryBuilder little)Creates a newspan_containingbuilder.static SpanFirstQueryBuilderspanFirstQuery(SpanQueryBuilder match, int end)static SpanMultiTermQueryBuilderspanMultiTermQueryBuilder(MultiTermQueryBuilder multiTermQueryBuilder)Creates aSpanQueryBuilderwhich allows having a sub query which implementsMultiTermQueryBuilder.static SpanNearQueryBuilderspanNearQuery(SpanQueryBuilder initialClause, int slop)static SpanNotQueryBuilderspanNotQuery(SpanQueryBuilder include, SpanQueryBuilder exclude)static SpanOrQueryBuilderspanOrQuery(SpanQueryBuilder initialClause)static SpanTermQueryBuilderspanTermQuery(String name, double value)static SpanTermQueryBuilderspanTermQuery(String name, float value)static SpanTermQueryBuilderspanTermQuery(String name, int value)static SpanTermQueryBuilderspanTermQuery(String name, long value)static SpanTermQueryBuilderspanTermQuery(String name, String value)static SpanWithinQueryBuilderspanWithinQuery(SpanQueryBuilder big, SpanQueryBuilder little)Creates a newspan_withinbuilder.static TermQueryBuilderA Query that matches documents containing a term.static TermQueryBuilderA Query that matches documents containing a term.static TermQueryBuilderA Query that matches documents containing a term.static TermQueryBuilderA Query that matches documents containing a term.static TermQueryBuilderA Query that matches documents containing a term.static TermQueryBuilderA Query that matches documents containing a term.static TermQueryBuilderA Query that matches documents containing a term.static TermsQueryBuildertermsLookupQuery(String name, TermsLookup termsLookup)A terms query that can extract the terms from another doc in an index.static TermsQueryBuildertermsQuery(String name, double... values)A filter for a field based on several terms matching on any of them.static TermsQueryBuildertermsQuery(String name, float... values)A filter for a field based on several terms matching on any of them.static TermsQueryBuildertermsQuery(String name, int... values)A filter for a field based on several terms matching on any of them.static TermsQueryBuildertermsQuery(String name, long... values)A filter for a field based on several terms matching on any of them.static TermsQueryBuildertermsQuery(String name, Object... values)A filter for a field based on several terms matching on any of them.static TermsQueryBuildertermsQuery(String name, String... values)A filter for a field based on several terms matching on any of them.static TermsQueryBuildertermsQuery(String name, Collection<?> values)A filter for a field based on several terms matching on any of them.static TypeQueryBuilderDeprecated.Types are going away, prefer filtering on a field.static WildcardQueryBuilderwildcardQuery(String name, String query)Implements the wildcard search query.static WrapperQueryBuilderwrapperQuery(byte[] source)A Query builder which allows building a query thanks to a JSON string or binary data.static WrapperQueryBuilderwrapperQuery(String source)A Query builder which allows building a query thanks to a JSON string or binary data.static WrapperQueryBuilderwrapperQuery(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. SeeSimpleQueryParserfor 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_withinbuilder.- Parameters:
big- the big clause, it must encloselittlefor a match.little- the little clause, it must be contained withinbigfor a match.
-
spanContainingQuery
public static SpanContainingQueryBuilder spanContainingQuery(SpanQueryBuilder big, SpanQueryBuilder little)Creates a newspan_containingbuilder.- Parameters:
big- the big clause, it must encloselittlefor a match.little- the little clause, it must be contained withinbigfor a match.
-
spanMultiTermQueryBuilder
public static SpanMultiTermQueryBuilder spanMultiTermQueryBuilder(MultiTermQueryBuilder multiTermQueryBuilder)Creates aSpanQueryBuilderwhich allows having a sub query which implementsMultiTermQueryBuilder. This is useful for having e.g. wildcard or fuzzy queries inside spans.- Parameters:
multiTermQueryBuilder- TheMultiTermQueryBuilderthat 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