Skip to content

Commit

Permalink
Merge pull request #9 from xapian/james/explicitly-year-ranges-are-al…
Browse files Browse the repository at this point in the history
…l-digits-only

Be clearer that year ranges can't use 2 digit years.
  • Loading branch information
jaylett committed Feb 16, 2016
2 parents 28cab34 + 7b97caf commit b313729
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion howtos/range_queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ The :xapian-class:`DateValueRangeProcessor` is working on value slot 2, with an
1860 and going forward as far 1959). The second parameter is whether
it should prefer US style dates or not; since we're looking at US
states, we've gone for US dates. The :xapian-class:`NumberValueRangeProcessor`
is as we saw before.
is as we saw before, which means that it can't cope with two digit years.

This enables us to search for any state that talks about the Spanish
in its description:
Expand Down Expand Up @@ -276,6 +276,11 @@ Or all that joined the union in the 1780s and have a population now over 10 mill
With a little more work, we could support ranges such as '..5m' to
mean up to 5 million, or '..750k' for up to 750 thousand.

Similarly, it would be possible to use the same approach to create a custom
:xapian-class:`ValueRangeProcessor` that could restrict to a range of years, and
cope with two digit years, as our :xapian-class:`DateValueRangeProcessor` did for
full dates.

Performance limitations
-----------------------

Expand Down

0 comments on commit b313729

Please sign in to comment.