diff --git a/search-xapian/XS/StringValueRangeProcessor.xs b/search-xapian/XS/StringValueRangeProcessor.xs
index 95da8d3..792f99e 100644
a
|
b
|
MODULE = Search::Xapian PACKAGE = Search::Xapian::StringValueRangeProcessor
|
3 | 3 | PROTOTYPES: ENABLE |
4 | 4 | |
5 | 5 | StringValueRangeProcessor * |
6 | | StringValueRangeProcessor::new(valueno valno) |
| 6 | StringValueRangeProcessor::new(valno, str="", prefix = TRUE) |
| 7 | valueno valno |
| 8 | string str |
| 9 | bool prefix |
7 | 10 | CODE: |
8 | | RETVAL = new StringValueRangeProcessor(valno); |
| 11 | switch (items) { /* items includes the hidden this pointer */ |
| 12 | case 2: |
| 13 | RETVAL = new StringValueRangeProcessor(valno); |
| 14 | break; |
| 15 | case 4: { |
| 16 | RETVAL = new StringValueRangeProcessor(valno, str, prefix); |
| 17 | break; |
| 18 | } |
| 19 | default: |
| 20 | croak("Bad parameter count for new"); |
| 21 | } |
9 | 22 | OUTPUT: |
10 | 23 | RETVAL |
11 | 24 | |
diff --git a/xapian-core/docs/valueranges.rst b/xapian-core/docs/valueranges.rst
index 85a8df4..8b7d023 100644
a
|
b
|
would report::
|
60 | 60 | The ``VALUE_RANGE`` subquery will only match documents where value 4 is |
61 | 61 | >= asimov and <= bradbury (using a string comparison). |
62 | 62 | |
| 63 | ``StringValueRangeProcessor`` also supports supplying a prefix or |
| 64 | suffix, so the user is able to filter queries to a range within a |
| 65 | specified value: |
| 66 | |
| 67 | prose country:chile..denmark |
| 68 | |
| 69 | This is done by providing the string to ``StringValueRangeProcessor``, |
| 70 | like this: |
| 71 | |
| 72 | Xapian::QueryParser qp; |
| 73 | Xapian::StringValueRangeProcessor country_proc(7, "country:", TRUE); |
| 74 | qp.add_valuerangeprocessor(&country_proc); |
| 75 | |
| 76 | The parsed query will include ``(VALUE_RANGE 7 chile denmark)`` in |
| 77 | this case. |
| 78 | |
| 79 | The last argument determines whether the string is a prefix or a |
| 80 | suffix (like perhaps a currency indicator: 10..100$). |
| 81 | |
63 | 82 | DateValueRangeProcessor |
64 | 83 | ======================= |
65 | 84 | |