org.elasticsearch.index.search
Class NumericRangeFieldDataFilter<T>

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by org.elasticsearch.index.search.NumericRangeFieldDataFilter<T>
All Implemented Interfaces:
Serializable

public abstract class NumericRangeFieldDataFilter<T>
extends org.apache.lucene.search.Filter

A numeric filter that can be much faster than NumericRangeFilter at the expense of loading numeric values of the field to memory using FieldDataCache.

See Also:
Serialized Form

Constructor Summary
protected NumericRangeFieldDataFilter(FieldDataCache fieldDataCache, String field, T lowerVal, T upperVal, boolean includeLower, boolean includeUpper)
           
 
Method Summary
 boolean equals(Object o)
           
 String getField()
           
 T getLowerVal()
           
 T getUpperVal()
           
 int hashCode()
           
 boolean isIncludeLower()
           
 boolean isIncludeUpper()
           
static NumericRangeFieldDataFilter<Byte> newByteRange(FieldDataCache fieldDataCache, String field, Byte lowerVal, Byte upperVal, boolean includeLower, boolean includeUpper)
           
static NumericRangeFieldDataFilter<Double> newDoubleRange(FieldDataCache fieldDataCache, String field, Double lowerVal, Double upperVal, boolean includeLower, boolean includeUpper)
           
static NumericRangeFieldDataFilter<Float> newFloatRange(FieldDataCache fieldDataCache, String field, Float lowerVal, Float upperVal, boolean includeLower, boolean includeUpper)
           
static NumericRangeFieldDataFilter<Integer> newIntRange(FieldDataCache fieldDataCache, String field, Integer lowerVal, Integer upperVal, boolean includeLower, boolean includeUpper)
           
static NumericRangeFieldDataFilter<Long> newLongRange(FieldDataCache fieldDataCache, String field, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)
           
static NumericRangeFieldDataFilter<Short> newShortRange(FieldDataCache fieldDataCache, String field, Short lowerVal, Short upperVal, boolean includeLower, boolean includeUpper)
           
 String toString()
           
 
Methods inherited from class org.apache.lucene.search.Filter
getDocIdSet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumericRangeFieldDataFilter

protected NumericRangeFieldDataFilter(FieldDataCache fieldDataCache,
                                      String field,
                                      T lowerVal,
                                      T upperVal,
                                      boolean includeLower,
                                      boolean includeUpper)
Method Detail

getField

public String getField()

getLowerVal

public T getLowerVal()

getUpperVal

public T getUpperVal()

isIncludeLower

public boolean isIncludeLower()

isIncludeUpper

public boolean isIncludeUpper()

toString

public final String toString()
Overrides:
toString in class Object

equals

public final boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

newByteRange

public static NumericRangeFieldDataFilter<Byte> newByteRange(FieldDataCache fieldDataCache,
                                                             String field,
                                                             Byte lowerVal,
                                                             Byte upperVal,
                                                             boolean includeLower,
                                                             boolean includeUpper)

newShortRange

public static NumericRangeFieldDataFilter<Short> newShortRange(FieldDataCache fieldDataCache,
                                                               String field,
                                                               Short lowerVal,
                                                               Short upperVal,
                                                               boolean includeLower,
                                                               boolean includeUpper)

newIntRange

public static NumericRangeFieldDataFilter<Integer> newIntRange(FieldDataCache fieldDataCache,
                                                               String field,
                                                               Integer lowerVal,
                                                               Integer upperVal,
                                                               boolean includeLower,
                                                               boolean includeUpper)

newLongRange

public static NumericRangeFieldDataFilter<Long> newLongRange(FieldDataCache fieldDataCache,
                                                             String field,
                                                             Long lowerVal,
                                                             Long upperVal,
                                                             boolean includeLower,
                                                             boolean includeUpper)

newFloatRange

public static NumericRangeFieldDataFilter<Float> newFloatRange(FieldDataCache fieldDataCache,
                                                               String field,
                                                               Float lowerVal,
                                                               Float upperVal,
                                                               boolean includeLower,
                                                               boolean includeUpper)

newDoubleRange

public static NumericRangeFieldDataFilter<Double> newDoubleRange(FieldDataCache fieldDataCache,
                                                                 String field,
                                                                 Double lowerVal,
                                                                 Double upperVal,
                                                                 boolean includeLower,
                                                                 boolean includeUpper)


Copyright © 2009-2012. All Rights Reserved.