org.elasticsearch.index.query
Class RangeFilterBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.BaseFilterBuilder
      extended by org.elasticsearch.index.query.RangeFilterBuilder
All Implemented Interfaces:
ToXContent, FilterBuilder

public class RangeFilterBuilder
extends BaseFilterBuilder

A filter that restricts search results to values that are within the given range.


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
RangeFilterBuilder(String name)
          A filter that restricts search results to values that are within the given range.
 
Method Summary
 RangeFilterBuilder cache(boolean cache)
          Should the filter be cached or not.
 RangeFilterBuilder cacheKey(String cacheKey)
           
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 RangeFilterBuilder filterName(String filterName)
          Sets the filter name for the filter that can be used when searching for matched_filters per hit.
 RangeFilterBuilder from(double from)
          The from part of the filter query.
 RangeFilterBuilder from(float from)
          The from part of the filter query.
 RangeFilterBuilder from(int from)
          The from part of the filter query.
 RangeFilterBuilder from(long from)
          The from part of the filter query.
 RangeFilterBuilder from(Object from)
          The from part of the filter query.
 RangeFilterBuilder gt(double from)
          The from part of the filter query.
 RangeFilterBuilder gt(float from)
          The from part of the filter query.
 RangeFilterBuilder gt(int from)
          The from part of the filter query.
 RangeFilterBuilder gt(long from)
          The from part of the filter query.
 RangeFilterBuilder gt(Object from)
          The from part of the filter query.
 RangeFilterBuilder gte(double from)
          The from part of the filter query.
 RangeFilterBuilder gte(float from)
          The from part of the filter query.
 RangeFilterBuilder gte(int from)
          The from part of the filter query.
 RangeFilterBuilder gte(long from)
          The from part of the filter query.
 RangeFilterBuilder gte(Object from)
          The from part of the filter query.
 RangeFilterBuilder includeLower(boolean includeLower)
          Should the lower bound be included or not.
 RangeFilterBuilder includeUpper(boolean includeUpper)
          Should the upper bound be included or not.
 RangeFilterBuilder lt(double to)
          The to part of the filter query.
 RangeFilterBuilder lt(float to)
          The to part of the filter query.
 RangeFilterBuilder lt(int to)
          The to part of the filter query.
 RangeFilterBuilder lt(long to)
          The to part of the filter query.
 RangeFilterBuilder lt(Object to)
          The to part of the filter query.
 RangeFilterBuilder lte(double to)
          The to part of the filter query.
 RangeFilterBuilder lte(float to)
          The to part of the filter query.
 RangeFilterBuilder lte(int to)
          The to part of the filter query.
 RangeFilterBuilder lte(long to)
          The to part of the filter query.
 RangeFilterBuilder lte(Object to)
          The to part of the filter query.
 RangeFilterBuilder to(double to)
          The to part of the filter query.
 RangeFilterBuilder to(float to)
          The to part of the filter query.
 RangeFilterBuilder to(int to)
          The to part of the filter query.
 RangeFilterBuilder to(long to)
          The to part of the filter query.
 RangeFilterBuilder to(Object to)
          The to part of the filter query.
 
Methods inherited from class org.elasticsearch.index.query.BaseFilterBuilder
toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeFilterBuilder

public RangeFilterBuilder(String name)
A filter that restricts search results to values that are within the given range.

Parameters:
name - The field name
Method Detail

from

public RangeFilterBuilder from(Object from)
The from part of the filter query. Null indicates unbounded.


from

public RangeFilterBuilder from(int from)
The from part of the filter query. Null indicates unbounded.


from

public RangeFilterBuilder from(long from)
The from part of the filter query. Null indicates unbounded.


from

public RangeFilterBuilder from(float from)
The from part of the filter query. Null indicates unbounded.


from

public RangeFilterBuilder from(double from)
The from part of the filter query. Null indicates unbounded.


gt

public RangeFilterBuilder gt(Object from)
The from part of the filter query. Null indicates unbounded.


gt

public RangeFilterBuilder gt(int from)
The from part of the filter query. Null indicates unbounded.


gt

public RangeFilterBuilder gt(long from)
The from part of the filter query. Null indicates unbounded.


gt

public RangeFilterBuilder gt(float from)
The from part of the filter query. Null indicates unbounded.


gt

public RangeFilterBuilder gt(double from)
The from part of the filter query. Null indicates unbounded.


gte

public RangeFilterBuilder gte(Object from)
The from part of the filter query. Null indicates unbounded.


gte

public RangeFilterBuilder gte(int from)
The from part of the filter query. Null indicates unbounded.


gte

public RangeFilterBuilder gte(long from)
The from part of the filter query. Null indicates unbounded.


gte

public RangeFilterBuilder gte(float from)
The from part of the filter query. Null indicates unbounded.


gte

public RangeFilterBuilder gte(double from)
The from part of the filter query. Null indicates unbounded.


to

public RangeFilterBuilder to(Object to)
The to part of the filter query. Null indicates unbounded.


to

public RangeFilterBuilder to(int to)
The to part of the filter query. Null indicates unbounded.


to

public RangeFilterBuilder to(long to)
The to part of the filter query. Null indicates unbounded.


to

public RangeFilterBuilder to(float to)
The to part of the filter query. Null indicates unbounded.


to

public RangeFilterBuilder to(double to)
The to part of the filter query. Null indicates unbounded.


lt

public RangeFilterBuilder lt(Object to)
The to part of the filter query. Null indicates unbounded.


lt

public RangeFilterBuilder lt(int to)
The to part of the filter query. Null indicates unbounded.


lt

public RangeFilterBuilder lt(long to)
The to part of the filter query. Null indicates unbounded.


lt

public RangeFilterBuilder lt(float to)
The to part of the filter query. Null indicates unbounded.


lt

public RangeFilterBuilder lt(double to)
The to part of the filter query. Null indicates unbounded.


lte

public RangeFilterBuilder lte(int to)
The to part of the filter query. Null indicates unbounded.


lte

public RangeFilterBuilder lte(long to)
The to part of the filter query. Null indicates unbounded.


lte

public RangeFilterBuilder lte(float to)
The to part of the filter query. Null indicates unbounded.


lte

public RangeFilterBuilder lte(double to)
The to part of the filter query. Null indicates unbounded.


lte

public RangeFilterBuilder lte(Object to)
The to part of the filter query. Null indicates unbounded.


includeLower

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


includeUpper

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


filterName

public RangeFilterBuilder filterName(String filterName)
Sets the filter name for the filter that can be used when searching for matched_filters per hit.


cache

public RangeFilterBuilder cache(boolean cache)
Should the filter be cached or not. Defaults to true.


cacheKey

public RangeFilterBuilder cacheKey(String cacheKey)

doXContent

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


Copyright © 2009-2012. All Rights Reserved.