phpzend-frameworkzend-search-lucene

Zend_Search_Lucene range query error


I have set up each document with a date field. (keyword)

Values stored in it are in this format; 20100511

Each time I try to perform a ranged query, I get the following error:

date:[10000000 TO 20000000]

At least one range query boundary term must be non-empty term

Anyone got a clue?

Update

I have gotten this to work programmatically. Does that mean the parser is buggy?

$from  = new Zend_Search_Lucene_Index_Term('10000000', 'dateOfBirthMod');
$to    = new Zend_Search_Lucene_Index_Term('20000000', 'dateOfBirthMod');
$query = new Zend_Search_Lucene_Search_Query_Range($from, $to, true);

Solution

  • Apparently it is a bug in the query parser (quite old btw). I would suggest that you either add a comment to that issue or open a new one to confirm that it is still happening in version x.x of the ZF.