155 virtual void addRange(
const String& minPrefixCoded,
const String& maxPrefixCoded);
159 virtual void addRange(int64_t min, int64_t max, int32_t shift);
169 virtual void addRange(
const String& minPrefixCoded,
const String& maxPrefixCoded);
173 virtual void addRange(int32_t min, int32_t max, int32_t shift);
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Definition NumericUtils.h:162
virtual void addRange(const String &minPrefixCoded, const String &maxPrefixCoded)
Overwrite this method, if you like to receive the already prefix encoded range bounds....
virtual void addRange(int32_t min, int32_t max, int32_t shift)
Overwrite this method, if you like to receive the raw int range bounds. You can use this for eg....
virtual ~IntRangeBuilder()
Callback for splitLongRange. You need to overwrite only one of the methods. NOTE: This is a very low-...
Definition NumericUtils.h:148
virtual void addRange(int64_t min, int64_t max, int32_t shift)
Overwrite this method, if you like to receive the raw long range bounds. You can use this for eg....
virtual void addRange(const String &minPrefixCoded, const String &maxPrefixCoded)
Overwrite this method, if you like to receive the already prefix encoded range bounds....
virtual ~LongRangeBuilder()
Base class for all Lucene classes.
Definition LuceneObject.h:31
This is a helper class to generate prefix-encoded representations for numerical values and supplies c...
Definition NumericUtils.h:37
static double sortableLongToDouble(int64_t val)
Converts a sortable long back to a double.
static void splitIntRange(const IntRangeBuilderPtr &builder, int32_t precisionStep, int32_t minBound, int32_t maxBound)
Splits an int32_t range recursively. You may implement a builder that adds clauses to a BooleanQuery ...
static const wchar_t SHIFT_START_INT
Integers are stored at lower precision by shifting off lower bits. The shift count is stored as SHIFT...
Definition NumericUtils.h:58
static int32_t intToPrefixCoded(int32_t val, int32_t shift, CharArray buffer)
Returns prefix coded bits after reducing the precision by shift bits. This is method is used by Numer...
static int64_t doubleToSortableLong(double val)
Converts a double value to a sortable signed long. The value is converted by getting their IEEE 754 f...
static int32_t prefixCodedToInt(const String &prefixCoded)
Returns an int from prefixCoded characters. Rightmost bits will be zero for lower precision codes....
static const int32_t BUF_SIZE_LONG
The maximum term length (used for char[] buffer size) for encoding long values.
Definition NumericUtils.h:54
static String longToPrefixCoded(int64_t val, int32_t shift)
Returns prefix coded bits after reducing the precision by shift bits. This is method is used by LongR...
static double prefixCodedToDouble(const String &val)
Convenience method: this just returns: sortableLongToDouble(prefixCodedToLong(val))
static int32_t longToPrefixCoded(int64_t val, int32_t shift, CharArray buffer)
Returns prefix coded bits after reducing the precision by shift bits. This is method is used by Numer...
static const int32_t BUF_SIZE_INT
The maximum term length (used for char[] buffer size) for encoding int values.
Definition NumericUtils.h:62
static const int32_t PRECISION_STEP_DEFAULT
The default precision step used by NumericField, NumericTokenStream, NumericRangeQuery,...
Definition NumericUtils.h:46
static void splitRange(const LuceneObjectPtr &builder, int32_t valSize, int32_t precisionStep, int64_t minBound, int64_t maxBound)
This helper does the splitting for both 32 and 64 bit.
static String doubleToPrefixCoded(double val)
Convenience method: this just returns: longToPrefixCoded(doubleToSortableLong(val))
static String longToPrefixCoded(int64_t val)
This is a convenience method, that returns prefix coded bits of a long without reducing the precision...
static String intToPrefixCoded(int32_t val)
This is a convenience method, that returns prefix coded bits of an int without reducing the precision...
static String intToPrefixCoded(int32_t val, int32_t shift)
Returns prefix coded bits after reducing the precision by shift bits. This is method is used by IntRa...
static const wchar_t SHIFT_START_LONG
Longs are stored at lower precision by shifting off lower bits. The shift count is stored as SHIFT_ST...
Definition NumericUtils.h:50
static void splitLongRange(const LongRangeBuilderPtr &builder, int32_t precisionStep, int64_t minBound, int64_t maxBound)
Splits a int64_t range recursively. You may implement a builder that adds clauses to a BooleanQuery f...
static int64_t prefixCodedToLong(const String &prefixCoded)
Returns a long from prefixCoded characters. Rightmost bits will be zero for lower precision codes....
static void addRange(const LuceneObjectPtr &builder, int32_t valSize, int64_t minBound, int64_t maxBound, int32_t shift)
Helper that delegates to correct range builder.
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
boost::shared_ptr< LongRangeBuilder > LongRangeBuilderPtr
Definition LuceneTypes.h:538
boost::shared_ptr< IntRangeBuilder > IntRangeBuilderPtr
Definition LuceneTypes.h:537