org.elasticsearch.index.query
Class RangeQueryBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.BaseQueryBuilder
      extended by org.elasticsearch.index.query.RangeQueryBuilder
All Implemented Interfaces:
ToXContent, BoostableQueryBuilder<RangeQueryBuilder>, QueryBuilder

public class RangeQueryBuilder
extends BaseQueryBuilder
implements BoostableQueryBuilder<RangeQueryBuilder>

A Query that matches documents within an range of terms.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
RangeQueryBuilder(String name)
          A Query that matches documents within an range of terms.
 
Method Summary
 RangeQueryBuilder boost(float boost)
          Sets the boost for this query.
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 RangeQueryBuilder from(double from)
          The from part of the range query.
 RangeQueryBuilder from(float from)
          The from part of the range query.
 RangeQueryBuilder from(int from)
          The from part of the range query.
 RangeQueryBuilder from(long from)
          The from part of the range query.
 RangeQueryBuilder from(Object from)
          The from part of the range query.
 RangeQueryBuilder from(String from)
          The from part of the range query.
 RangeQueryBuilder gt(double from)
          The from part of the range query.
 RangeQueryBuilder gt(float from)
          The from part of the range query.
 RangeQueryBuilder gt(int from)
          The from part of the range query.
 RangeQueryBuilder gt(long from)
          The from part of the range query.
 RangeQueryBuilder gt(Object from)
          The from part of the range query.
 RangeQueryBuilder gt(String from)
          The from part of the range query.
 RangeQueryBuilder gte(double from)
          The from part of the range query.
 RangeQueryBuilder gte(float from)
          The from part of the range query.
 RangeQueryBuilder gte(int from)
          The from part of the range query.
 RangeQueryBuilder gte(long from)
          The from part of the range query.
 RangeQueryBuilder gte(Object from)
          The from part of the range query.
 RangeQueryBuilder gte(String from)
          The from part of the range query.
 RangeQueryBuilder includeLower(boolean includeLower)
          Should the lower bound be included or not.
 RangeQueryBuilder includeUpper(boolean includeUpper)
          Should the upper bound be included or not.
 RangeQueryBuilder lt(double to)
          The to part of the range query.
 RangeQueryBuilder lt(float to)
          The to part of the range query.
 RangeQueryBuilder lt(int to)
          The to part of the range query.
 RangeQueryBuilder lt(long to)
          The to part of the range query.
 RangeQueryBuilder lt(Object to)
          The to part of the range query.
 RangeQueryBuilder lt(String to)
          The to part of the range query.
 RangeQueryBuilder lte(double to)
          The to part of the range query.
 RangeQueryBuilder lte(float to)
          The to part of the range query.
 RangeQueryBuilder lte(int to)
          The to part of the range query.
 RangeQueryBuilder lte(long to)
          The to part of the range query.
 RangeQueryBuilder lte(Object to)
          The to part of the range query.
 RangeQueryBuilder lte(String to)
          The to part of the range query.
 RangeQueryBuilder to(double to)
          The to part of the range query.
 RangeQueryBuilder to(float to)
          The to part of the range query.
 RangeQueryBuilder to(int to)
          The to part of the range query.
 RangeQueryBuilder to(long to)
          The to part of the range query.
 RangeQueryBuilder to(Object to)
          The to part of the range query.
 RangeQueryBuilder to(String to)
          The to part of the range query.
 
Methods inherited from class org.elasticsearch.index.query.BaseQueryBuilder
buildAsBytes, buildAsBytes, toString, toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeQueryBuilder

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

Parameters:
name - The field name
Method Detail

from

public RangeQueryBuilder from(Object from)
The from part of the range query. Null indicates unbounded.


from

public RangeQueryBuilder from(String from)
The from part of the range query. Null indicates unbounded.


from

public RangeQueryBuilder from(int from)
The from part of the range query. Null indicates unbounded.


from

public RangeQueryBuilder from(long from)
The from part of the range query. Null indicates unbounded.


from

public RangeQueryBuilder from(float from)
The from part of the range query. Null indicates unbounded.


from

public RangeQueryBuilder from(double from)
The from part of the range query. Null indicates unbounded.


gt

public RangeQueryBuilder gt(String from)
The from part of the range query. Null indicates unbounded.


gt

public RangeQueryBuilder gt(Object from)
The from part of the range query. Null indicates unbounded.


gt

public RangeQueryBuilder gt(int from)
The from part of the range query. Null indicates unbounded.


gt

public RangeQueryBuilder gt(long from)
The from part of the range query. Null indicates unbounded.


gt

public RangeQueryBuilder gt(float from)
The from part of the range query. Null indicates unbounded.


gt

public RangeQueryBuilder gt(double from)
The from part of the range query. Null indicates unbounded.


gte

public RangeQueryBuilder gte(String from)
The from part of the range query. Null indicates unbounded.


gte

public RangeQueryBuilder gte(Object from)
The from part of the range query. Null indicates unbounded.


gte

public RangeQueryBuilder gte(int from)
The from part of the range query. Null indicates unbounded.


gte

public RangeQueryBuilder gte(long from)
The from part of the range query. Null indicates unbounded.


gte

public RangeQueryBuilder gte(float from)
The from part of the range query. Null indicates unbounded.


gte

public RangeQueryBuilder gte(double from)
The from part of the range query. Null indicates unbounded.


to

public RangeQueryBuilder to(Object to)
The to part of the range query. Null indicates unbounded.


to

public RangeQueryBuilder to(String to)
The to part of the range query. Null indicates unbounded.


to

public RangeQueryBuilder to(int to)
The to part of the range query. Null indicates unbounded.


to

public RangeQueryBuilder to(long to)
The to part of the range query. Null indicates unbounded.


to

public RangeQueryBuilder to(float to)
The to part of the range query. Null indicates unbounded.


to

public RangeQueryBuilder to(double to)
The to part of the range query. Null indicates unbounded.


lt

public RangeQueryBuilder lt(String to)
The to part of the range query. Null indicates unbounded.


lt

public RangeQueryBuilder lt(Object to)
The to part of the range query. Null indicates unbounded.


lt

public RangeQueryBuilder lt(int to)
The to part of the range query. Null indicates unbounded.


lt

public RangeQueryBuilder lt(long to)
The to part of the range query. Null indicates unbounded.


lt

public RangeQueryBuilder lt(float to)
The to part of the range query. Null indicates unbounded.


lt

public RangeQueryBuilder lt(double to)
The to part of the range query. Null indicates unbounded.


lte

public RangeQueryBuilder lte(String to)
The to part of the range query. Null indicates unbounded.


lte

public RangeQueryBuilder lte(Object to)
The to part of the range query. Null indicates unbounded.


lte

public RangeQueryBuilder lte(int to)
The to part of the range query. Null indicates unbounded.


lte

public RangeQueryBuilder lte(long to)
The to part of the range query. Null indicates unbounded.


lte

public RangeQueryBuilder lte(float to)
The to part of the range query. Null indicates unbounded.


lte

public RangeQueryBuilder lte(double to)
The to part of the range query. Null indicates unbounded.


includeLower

public RangeQueryBuilder includeLower(boolean includeLower)
Should the lower bound be included or not. Defaults to true.


includeUpper

public RangeQueryBuilder includeUpper(boolean includeUpper)
Should the upper bound be included or not. Defaults to true.


boost

public RangeQueryBuilder boost(float boost)
Sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.

Specified by:
boost in interface BoostableQueryBuilder<RangeQueryBuilder>

doXContent

protected void doXContent(XContentBuilder builder,
                          ToXContent.Params params)
                   throws IOException
Specified by:
doXContent in class BaseQueryBuilder
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.