[Xapian-discuss] a strange type of alias/expanded term

Andreas Marienborg andreas at startsiden.no
Mon Oct 13 14:56:23 BST 2008


I was wondering if there is any way I can coach queryparser into  
something like this, so I don't have to pre-parse the query myself:  
(pseudo code)

my $query_string = 'jazz oslo today';

$qp->add_alias('today' => 'D20081013');

my $q = $qp->parse($query_string);

is($q->get_description, '(jazz AND oslo AND D20081013)');

basicly I want to somehow expand today to todays date, this week to a  
range, tomorrow to something etc, but not sure how I might best do it?

the other option, to pre-process, is doable I guess, but it might be  
more error-prone?

- andreas

More information about the Xapian-discuss mailing list