Extracted at 2016-03-29.
pike.lysator.liu.se
[Top]
Public
Public.Xapian
Public.Xapian.NumberValueRangeProcessor

Method Public.Xapian.NumberValueRangeProcessor()->create()


Method create

Public.Xapian.NumberValueRangeProcessor Public.Xapian.NumberValueRangeProcessor(int valueno, string _str, int is_prefix)

Description

The string supplied in str_ is used by operator() to decide whether the pair of strings supplied to it constitute a valid range. If prefix_ is true, the first value in a range must begin with str_ (and the second value may optionally begin with str_); if prefix_ is false, the second value in a range must end with str_ (and the first value may optionally end with str_).

If str_ is empty, the setting of prefix_ is irrelevant, and no special strings are required at the start or end of the strings defining the range.

The remainder of both strings defining the endpoints must be valid floating point numbers. (FIXME: define format recognised).

For example, if str_ is "$" and prefix_ is true, and the range processor has been added to the queryparser, the queryparser will accept "$10..50" or "$10..50", but not "10..50" or "10..$50" as valid ranges. If str_ is "kg" and prefix_ is false, the queryparser will accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" as valid ranges.