[Xapian-discuss] value range in perl

Jim Spath jspath at pangeamedia.com
Fri Oct 26 17:43:13 BST 2007


I've been struggling trying to figure out now to do a value range search 
in Perl.

My omega indexer_script file has the following line in it:

create_date : value=0 date=yyyymmdd

I've been able to sort on this value by doing the following:

$enq->set_sort_by_value_then_relevance(0);

But I'm getting stuck on the value range.  When I attempt to add 
MM/DD/YYYY..MM/DD/YYYY to the query string, it doesn't seem to recognize 
that I am trying to use a value range:

query string: test 10/26/2006..10/26/2007

Xapian::Query((Ztest:(pos=1) AND (10:(pos=2) PHRASE 6 26:(pos=3) PHRASE 
6 2006:(pos=4) PHRASE 6 10:(pos=5) PHRASE 6 26:(pos=6) PHRASE 6 
2007:(pos=7))))

FYI, we are using 1.0.0.0 ... do I simply need to upgrade, or am I doing 
something else wrong?

Thanks!
- Jim



More information about the Xapian-discuss mailing list