[Xapian-discuss] Comparing against values (e.g. date ranges)

Olly Betts olly at survex.com
Wed Apr 5 19:49:46 BST 2006


On Wed, Apr 05, 2006 at 04:44:21PM +0100, Francis Irving wrote:
> I'm once again looking for search with date ranges. e.g. All entries
> before a certain date.
> 
> I understand that Omega does this by adding keywords for each year,
> month and day number separately and construcing a big OR query
> year = 1980 or year = 1981 or year = 1982 .... or (year = 1983 and
> (month =1 or month = 2 ...))

Actually it's more like:

  year = 1980 or year = 1981 or year = 1982 or
  (yearmonth = 198301 or yearmonth = 198302 ...)

> I think Olly said he was considering adding something to Xapian,
> so the same fields used for sorting can be used for range
> comparison.
> 
> Any progress on this?

The feature already exists (the Xapian::MatchDecider class) - it's
just that the way values are currently stored means it'll probably
be significantly slower than Omega's approach (I've not actually
benchmarked this though - I could be wrong).

I plan to change how values are stored in flint, which I think is
what you're referring to.  But I haven't yet done this.

Cheers,
    Olly



More information about the Xapian-discuss mailing list