[Xapian-discuss] [Omega] Filtering on time instead of date

Olly Betts olly at survex.com
Wed May 3 14:15:47 BST 2006


On Wed, May 03, 2006 at 02:08:16PM +0200, Eric Bus wrote:
> Currently Omega/scriptindex supports filtering by date. For example, all 
> dates between START and END. Would it be possible to extend this 
> behaviour to include the time?

It's possible, but would involve generating and filtering on a lot more
terms (how many would depending on the resolution wanted).

It'd be easier to do using a MatchDecider, but they probably need some
more work before they can match the current approach for efficiency.

> We have documents which expire. In order to filter out 'old' articles, 
> we would like to check if the document date is between START=NOW and 
> END=MAXINT.

It's probably better to either not set END (in which case it defaults to
the current date) or to set it sufficiently in the future that it'll
encompass any forward dates which might be seen.  Using MAXINT creates
useless work for the date routines as they'll try to generate a boolean
OR involving around 212742 year terms which don't exist...

Cheers,
    Olly



More information about the Xapian-discuss mailing list