org.elasticsearch.index.query
Class QueryBuilders

java.lang.Object
  extended by org.elasticsearch.index.query.QueryBuilders

public abstract class QueryBuilders
extends Object

A static factory for simple "import static" usage.


Method Summary
static BoolQueryBuilder boolQuery()
          A Query that matches documents matching boolean combinations of other queries.
static BoostingQueryBuilder boostingQuery()
          The BoostingQuery class can be used to effectively demote results that match a given query.
static ConstantScoreQueryBuilder constantScoreQuery(FilterBuilder filterBuilder)
          A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.
static CustomBoostFactorQueryBuilder customBoostFactorQuery(QueryBuilder queryBuilder)
          A query that simply applies the boost fact to the wrapped query (multiplies it).
static CustomFiltersScoreQueryBuilder customFiltersScoreQuery(QueryBuilder queryBuilder)
           
static CustomScoreQueryBuilder customScoreQuery(QueryBuilder queryBuilder)
          A query that allows to define a custom scoring script.
static DisMaxQueryBuilder 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.
static FieldMaskingSpanQueryBuilder fieldMaskingSpanQuery(SpanQueryBuilder query, String field)
           
static FieldQueryBuilder fieldQuery(String name, boolean query)
          A query that executes the query string against a field.
static FieldQueryBuilder fieldQuery(String name, double query)
          A query that executes the query string against a field.
static FieldQueryBuilder fieldQuery(String name, float query)
          A query that executes the query string against a field.
static FieldQueryBuilder fieldQuery(String name, int query)
          A query that executes the query string against a field.
static FieldQueryBuilder fieldQuery(String name, long query)
          A query that executes the query string against a field.
static FieldQueryBuilder fieldQuery(String name, Object query)
          A query that executes the query string against a field.
static FieldQueryBuilder fieldQuery(String name, String query)
          A query that executes the query string against a field.
static FilteredQueryBuilder filtered(QueryBuilder queryBuilder, FilterBuilder filterBuilder)
          Deprecated. Use filteredQuery instead (rename)
static FilteredQueryBuilder filteredQuery(QueryBuilder queryBuilder, FilterBuilder filterBuilder)
          A query that applies a filter to the results of another query.
static FuzzyLikeThisFieldQueryBuilder fuzzyLikeThisFieldQuery(String name)
          A fuzzy like this query that finds documents that are "like" the provided FuzzyLikeThisFieldQueryBuilder.likeText(String).
static FuzzyLikeThisQueryBuilder fuzzyLikeThisQuery()
          A fuzzy like this query that finds documents that are "like" the provided FuzzyLikeThisQueryBuilder.likeText(String) which is checked against the "_all" field.
static FuzzyLikeThisQueryBuilder fuzzyLikeThisQuery(String... fields)
          A fuzzy like this query that finds documents that are "like" the provided FuzzyLikeThisQueryBuilder.likeText(String) which is checked against the fields the query is constructed with.
static FuzzyQueryBuilder fuzzyQuery(String name, String value)
          A Query that matches documents using fuzzy query.
static GeoShapeQueryBuilder geoShapeQuery(String name, com.spatial4j.core.shape.Shape shape)
          Query that matches Documents based on the relationship between the given shape and indexed shapes
static HasChildQueryBuilder hasChildQuery(String type, QueryBuilder query)
          Constructs a new NON scoring child query, with the child type and the query to run on the child documents.
static IdsQueryBuilder idsQuery(String... types)
          Constructs a query that will match only specific ids within types.
static IndicesQueryBuilder indicesQuery(QueryBuilder queryBuilder, String... indices)
          A query that will execute the wrapped query only for the specified indices, and "match_all" when it does not match those indices.
static TermsQueryBuilder inQuery(String name, double... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder inQuery(String name, float... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder inQuery(String name, int... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder inQuery(String name, long... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder inQuery(String name, Object... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder inQuery(String name, String... values)
          A filer for a field based on several terms matching on any of them.
static MatchAllQueryBuilder matchAllQuery()
          A query that match on all documents.
static MatchQueryBuilder matchPhrasePrefixQuery(String name, Object text)
          Creates a match query with type "PHRASE_PREFIX" for the provided field name and text.
static MatchQueryBuilder 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 MoreLikeThisFieldQueryBuilder moreLikeThisFieldQuery(String name)
          A more like this query that runs against a specific field.
static MoreLikeThisQueryBuilder moreLikeThisQuery()
          A more like this query that finds documents that are "like" the provided MoreLikeThisQueryBuilder.likeText(String) which is checked against the "_all" field.
static MoreLikeThisQueryBuilder moreLikeThisQuery(String... fields)
          A more like this query that finds documents that are "like" the provided MoreLikeThisQueryBuilder.likeText(String) which is checked against the fields the query is constructed with.
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, FilterBuilder filter)
           
static NestedQueryBuilder nestedQuery(String path, QueryBuilder query)
           
static PrefixQueryBuilder prefixQuery(String name, String prefix)
          A Query that matches documents containing terms with a specified prefix.
static QueryStringQueryBuilder queryString(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 SpanFirstQueryBuilder spanFirstQuery(SpanQueryBuilder match, int end)
           
static SpanNearQueryBuilder spanNearQuery()
           
static SpanNotQueryBuilder spanNotQuery()
           
static SpanOrQueryBuilder spanOrQuery()
           
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 TermQueryBuilder termQuery(String name, boolean value)
          A Query that matches documents containing a term.
static TermQueryBuilder termQuery(String name, double value)
          A Query that matches documents containing a term.
static TermQueryBuilder termQuery(String name, float value)
          A Query that matches documents containing a term.
static TermQueryBuilder termQuery(String name, int value)
          A Query that matches documents containing a term.
static TermQueryBuilder termQuery(String name, long value)
          A Query that matches documents containing a term.
static TermQueryBuilder termQuery(String name, Object value)
          A Query that matches documents containing a term.
static TermQueryBuilder termQuery(String name, String value)
          A Query that matches documents containing a term.
static TermsQueryBuilder termsQuery(String name, double... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder termsQuery(String name, float... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder termsQuery(String name, int... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder termsQuery(String name, long... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder termsQuery(String name, Object... values)
          A filer for a field based on several terms matching on any of them.
static TermsQueryBuilder termsQuery(String name, String... values)
          A filer for a field based on several terms matching on any of them.
static MatchQueryBuilder text(String name, Object text)
          Deprecated. use textQuery(String, Object) instead
static MatchQueryBuilder textPhrase(String name, Object text)
          Deprecated. use textPhraseQuery(String, Object) instead
static MatchQueryBuilder textPhrasePrefix(String name, Object text)
          Deprecated. use textPhrasePrefixQuery(String, Object) instead
static MatchQueryBuilder textPhrasePrefixQuery(String name, Object text)
          Deprecated. Use matchPhrasePrefixQuery(String, Object)
static MatchQueryBuilder textPhraseQuery(String name, Object text)
          Deprecated. Use matchPhraseQuery(String, Object)
static MatchQueryBuilder textQuery(String name, Object text)
          Deprecated. Use matchQuery(String, Object)
static TopChildrenQueryBuilder topChildrenQuery(String type, QueryBuilder query)
          Constructs a new scoring child query, with the child type and the query to run on the child documents.
static WildcardQueryBuilder wildcardQuery(String name, String query)
          Implements the wildcard search query.
static WrapperQueryBuilder wrapperQuery(byte[] source, int offset, int length)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

matchAllQuery

public static MatchAllQueryBuilder matchAllQuery()
A query that match on all documents.


text

public static MatchQueryBuilder text(String name,
                                     Object text)
Deprecated. use textQuery(String, Object) instead

Creates a text query with type "BOOLEAN" for the provided field name and text.

Parameters:
name - The field name.
text - The query text (to be analyzed).

textQuery

public static MatchQueryBuilder textQuery(String name,
                                          Object text)
Deprecated. Use matchQuery(String, Object)

Creates a text query with type "BOOLEAN" for the provided field name and text.

Parameters:
name - The field name.
text - The query text (to be analyzed).

matchQuery

public static MatchQueryBuilder matchQuery(String name,
                                           Object text)
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).

multiMatchQuery

public static MultiMatchQueryBuilder multiMatchQuery(Object text,
                                                     String... fieldNames)
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).

textPhrase

public static MatchQueryBuilder textPhrase(String name,
                                           Object text)
Deprecated. use textPhraseQuery(String, Object) instead

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).

textPhraseQuery

public static MatchQueryBuilder textPhraseQuery(String name,
                                                Object text)
Deprecated. Use matchPhraseQuery(String, Object)

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).

matchPhraseQuery

public static MatchQueryBuilder matchPhraseQuery(String name,
                                                 Object text)
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).

textPhrasePrefix

public static MatchQueryBuilder textPhrasePrefix(String name,
                                                 Object text)
Deprecated. use textPhrasePrefixQuery(String, Object) instead

Creates a text query with type "PHRASE_PREFIX" for the provided field name and text.

Parameters:
name - The field name.
text - The query text (to be analyzed).

textPhrasePrefixQuery

public static MatchQueryBuilder textPhrasePrefixQuery(String name,
                                                      Object text)
Deprecated. Use matchPhrasePrefixQuery(String, Object)

Creates a text query with type "PHRASE_PREFIX" for the provided field name and text.

Parameters:
name - The field name.
text - The query text (to be analyzed).

matchPhrasePrefixQuery

public static MatchQueryBuilder matchPhrasePrefixQuery(String name,
                                                       Object text)
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

public static DisMaxQueryBuilder 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.


idsQuery

public static IdsQueryBuilder idsQuery(@Nullable
                                       String... types)
Constructs a query that will match only specific ids within types.

Parameters:
types - The mapping/doc type

termQuery

public static TermQueryBuilder termQuery(String name,
                                         String value)
A Query that matches documents containing a term.

Parameters:
name - The name of the field
value - The value of the term

termQuery

public static TermQueryBuilder termQuery(String name,
                                         int value)
A Query that matches documents containing a term.

Parameters:
name - The name of the field
value - The value of the term

termQuery

public static TermQueryBuilder termQuery(String name,
                                         long value)
A Query that matches documents containing a term.

Parameters:
name - The name of the field
value - The value of the term

termQuery

public static TermQueryBuilder termQuery(String name,
                                         float value)
A Query that matches documents containing a term.

Parameters:
name - The name of the field
value - The value of the term

termQuery

public static TermQueryBuilder termQuery(String name,
                                         double value)
A Query that matches documents containing a term.

Parameters:
name - The name of the field
value - The value of the term

termQuery

public static TermQueryBuilder termQuery(String name,
                                         boolean value)
A Query that matches documents containing a term.

Parameters:
name - The name of the field
value - The value of the term

termQuery

public static TermQueryBuilder termQuery(String name,
                                         Object value)
A Query that matches documents containing a term.

Parameters:
name - The name of the field
value - The value of the term

fuzzyQuery

public static FuzzyQueryBuilder fuzzyQuery(String name,
                                           String value)
A Query that matches documents using fuzzy query.

Parameters:
name - The name of the field
value - The value of the term

fieldQuery

public static FieldQueryBuilder fieldQuery(String name,
                                           String query)
A query that executes the query string against a field. It is a simplified version of QueryStringQueryBuilder that simply runs against a single field.

Parameters:
name - The name of the field

fieldQuery

public static FieldQueryBuilder fieldQuery(String name,
                                           int query)
A query that executes the query string against a field. It is a simplified version of QueryStringQueryBuilder that simply runs against a single field.

Parameters:
name - The name of the field
query - The query string

fieldQuery

public static FieldQueryBuilder fieldQuery(String name,
                                           long query)
A query that executes the query string against a field. It is a simplified version of QueryStringQueryBuilder that simply runs against a single field.

Parameters:
name - The name of the field
query - The query string

fieldQuery

public static FieldQueryBuilder fieldQuery(String name,
                                           float query)
A query that executes the query string against a field. It is a simplified version of QueryStringQueryBuilder that simply runs against a single field.

Parameters:
name - The name of the field
query - The query string

fieldQuery

public static FieldQueryBuilder fieldQuery(String name,
                                           double query)
A query that executes the query string against a field. It is a simplified version of QueryStringQueryBuilder that simply runs against a single field.

Parameters:
name - The name of the field
query - The query string

fieldQuery

public static FieldQueryBuilder fieldQuery(String name,
                                           boolean query)
A query that executes the query string against a field. It is a simplified version of QueryStringQueryBuilder that simply runs against a single field.

Parameters:
name - The name of the field
query - The query string

fieldQuery

public static FieldQueryBuilder fieldQuery(String name,
                                           Object query)
A query that executes the query string against a field. It is a simplified version of QueryStringQueryBuilder that simply runs against a single field.

Parameters:
name - The name of the field
query - The query string

prefixQuery

public static PrefixQueryBuilder prefixQuery(String name,
                                             String prefix)
A Query that matches documents containing terms with a specified prefix.

Parameters:
name - The name of the field
prefix - The prefix query

rangeQuery

public static RangeQueryBuilder rangeQuery(String name)
A Query that matches documents within an range of terms.

Parameters:
name - The field name

wildcardQuery

public static WildcardQueryBuilder wildcardQuery(String name,
                                                 String query)
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 ?.

Parameters:
name - The field name
query - The wildcard query string

queryString

public static QueryStringQueryBuilder queryString(String queryString)
A query that parses a query string and runs it. There are two modes that this operates. The first, when no field is added (using QueryStringQueryBuilder.field(String), will run the query once and non prefixed fields will use the QueryStringQueryBuilder.defaultField(String) set. The second, when one or more fields are added (using QueryStringQueryBuilder.field(String)), will run the parsed query against the provided fields, and combine them either using DisMax or a plain boolean query (see QueryStringQueryBuilder.useDisMax(boolean)).

Parameters:
queryString - The query string to run

boostingQuery

public static BoostingQueryBuilder boostingQuery()
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

public static BoolQueryBuilder boolQuery()
A Query that matches documents matching boolean combinations of other queries.


spanTermQuery

public static SpanTermQueryBuilder spanTermQuery(String name,
                                                 String value)

spanTermQuery

public static SpanTermQueryBuilder spanTermQuery(String name,
                                                 int value)

spanTermQuery

public static SpanTermQueryBuilder spanTermQuery(String name,
                                                 long value)

spanTermQuery

public static SpanTermQueryBuilder spanTermQuery(String name,
                                                 float value)

spanTermQuery

public static SpanTermQueryBuilder spanTermQuery(String name,
                                                 double value)

spanFirstQuery

public static SpanFirstQueryBuilder spanFirstQuery(SpanQueryBuilder match,
                                                   int end)

spanNearQuery

public static SpanNearQueryBuilder spanNearQuery()

spanNotQuery

public static SpanNotQueryBuilder spanNotQuery()

spanOrQuery

public static SpanOrQueryBuilder spanOrQuery()

fieldMaskingSpanQuery

public static FieldMaskingSpanQueryBuilder fieldMaskingSpanQuery(SpanQueryBuilder query,
                                                                 String field)

filtered

public static FilteredQueryBuilder filtered(QueryBuilder queryBuilder,
                                            @Nullable
                                            FilterBuilder filterBuilder)
Deprecated. Use filteredQuery instead (rename)

A query that applies a filter to the results of another query.

Parameters:
queryBuilder - The query to apply the filter to
filterBuilder - The filter to apply on the query

filteredQuery

public static FilteredQueryBuilder filteredQuery(QueryBuilder queryBuilder,
                                                 @Nullable
                                                 FilterBuilder filterBuilder)
A query that applies a filter to the results of another query.

Parameters:
queryBuilder - The query to apply the filter to
filterBuilder - The filter to apply on the query

constantScoreQuery

public static ConstantScoreQueryBuilder constantScoreQuery(FilterBuilder filterBuilder)
A query that wraps a filter and simply returns a constant score equal to the query boost for every document in the filter.

Parameters:
filterBuilder - The filter to wrap in a constant score query

customBoostFactorQuery

public static CustomBoostFactorQueryBuilder customBoostFactorQuery(QueryBuilder queryBuilder)
A query that simply applies the boost fact to the wrapped query (multiplies it).

Parameters:
queryBuilder - The query to apply the boost factor to.

customScoreQuery

public static CustomScoreQueryBuilder customScoreQuery(QueryBuilder queryBuilder)
A query that allows to define a custom scoring script.

Parameters:
queryBuilder - The query to custom score

customFiltersScoreQuery

public static CustomFiltersScoreQueryBuilder customFiltersScoreQuery(QueryBuilder queryBuilder)

moreLikeThisQuery

public static MoreLikeThisQueryBuilder moreLikeThisQuery(String... fields)
A more like this query that finds documents that are "like" the provided MoreLikeThisQueryBuilder.likeText(String) which is checked against the fields the query is constructed with.

Parameters:
fields - The fields to run the query against

moreLikeThisQuery

public static MoreLikeThisQueryBuilder moreLikeThisQuery()
A more like this query that finds documents that are "like" the provided MoreLikeThisQueryBuilder.likeText(String) which is checked against the "_all" field.


fuzzyLikeThisQuery

public static FuzzyLikeThisQueryBuilder fuzzyLikeThisQuery(String... fields)
A fuzzy like this query that finds documents that are "like" the provided FuzzyLikeThisQueryBuilder.likeText(String) which is checked against the fields the query is constructed with.

Parameters:
fields - The fields to run the query against

fuzzyLikeThisQuery

public static FuzzyLikeThisQueryBuilder fuzzyLikeThisQuery()
A fuzzy like this query that finds documents that are "like" the provided FuzzyLikeThisQueryBuilder.likeText(String) which is checked against the "_all" field.


fuzzyLikeThisFieldQuery

public static FuzzyLikeThisFieldQueryBuilder fuzzyLikeThisFieldQuery(String name)
A fuzzy like this query that finds documents that are "like" the provided FuzzyLikeThisFieldQueryBuilder.likeText(String).


moreLikeThisFieldQuery

public static MoreLikeThisFieldQueryBuilder moreLikeThisFieldQuery(String name)
A more like this query that runs against a specific field.

Parameters:
name - The field name

topChildrenQuery

public static TopChildrenQueryBuilder topChildrenQuery(String type,
                                                       QueryBuilder query)
Constructs a new scoring child query, with the child type and the query to run on the child documents. The results of this query are the parent docs that those child docs matched.

Parameters:
type - The child type.
query - The query.

hasChildQuery

public static HasChildQueryBuilder hasChildQuery(String type,
                                                 QueryBuilder query)
Constructs a new NON scoring child query, with the child type and the query to run on the child documents. The results of this query are the parent docs that those child docs matched.

Parameters:
type - The child type.
query - The query.

nestedQuery

public static NestedQueryBuilder nestedQuery(String path,
                                             QueryBuilder query)

nestedQuery

public static NestedQueryBuilder nestedQuery(String path,
                                             FilterBuilder filter)

termsQuery

public static TermsQueryBuilder termsQuery(String name,
                                           String... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

termsQuery

public static TermsQueryBuilder termsQuery(String name,
                                           int... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

termsQuery

public static TermsQueryBuilder termsQuery(String name,
                                           long... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

termsQuery

public static TermsQueryBuilder termsQuery(String name,
                                           float... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

termsQuery

public static TermsQueryBuilder termsQuery(String name,
                                           double... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

termsQuery

public static TermsQueryBuilder termsQuery(String name,
                                           Object... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

inQuery

public static TermsQueryBuilder inQuery(String name,
                                        String... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

inQuery

public static TermsQueryBuilder inQuery(String name,
                                        int... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

inQuery

public static TermsQueryBuilder inQuery(String name,
                                        long... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

inQuery

public static TermsQueryBuilder inQuery(String name,
                                        float... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

inQuery

public static TermsQueryBuilder inQuery(String name,
                                        double... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

inQuery

public static TermsQueryBuilder inQuery(String name,
                                        Object... values)
A filer for a field based on several terms matching on any of them.

Parameters:
name - The field name
values - The terms

indicesQuery

public static IndicesQueryBuilder indicesQuery(QueryBuilder queryBuilder,
                                               String... indices)
A query that will execute the wrapped query only for the specified indices, and "match_all" when it does not match those indices.


wrapperQuery

public static WrapperQueryBuilder wrapperQuery(String source)
A Query builder which allows building a query thanks to a JSON string or binary data.


wrapperQuery

public static WrapperQueryBuilder wrapperQuery(byte[] source,
                                               int offset,
                                               int length)
A Query builder which allows building a query thanks to a JSON string or binary data.


geoShapeQuery

public static GeoShapeQueryBuilder geoShapeQuery(String name,
                                                 com.spatial4j.core.shape.Shape shape)
Query that matches Documents based on the relationship between the given shape and indexed shapes

Parameters:
name - The shape field name
shape - Shape to use in the Query


Copyright © 2009-2012. All Rights Reserved.