[Xapian-discuss] query within value range
Mark Clarkson
mark.clarkson at smorg.co.uk
Tue Jun 19 18:31:48 BST 2007
On Tue, 2007-06-19 at 17:07 +0100, Richard Boulton wrote:
> Mark Clarkson wrote:
> > Indeed, I can use 20070618..20070619, or 20070618000000..20070619000000
> > on the same date/time Values. :)
>
> Not quite true, surely: 20070618000000..20070619000000 won't match
> 20070618, will it? And will match 20070619, which I'm not sure it should.
It works either way with date/time stored in the index but I didn't
think about it the other way round. Just to get my head round it:
$ sort bob
20070618
20070618000000 <--
20070618111111
20070618235959
20070618888888
20070619
20070619000000 <--
, which I think would be wrong.
> This could be addressed by stripping trailing zeros from the time value,
> I suppose. But I'm not completely confident that this makes sense.
>
It looks like that actually works:
$ sort bob
20070618 <--
20070618
200706181
2007061811
20070618111
200706181111
20070618111111
20070618235959
20070618888888
20070619
20070619 <--
200706191
2007061911
20070619111
200706191111
I'm not sure though.
More information about the Xapian-discuss
mailing list