Zend_Search_Lucene and Range Search
I have a bunch of int key fields in my index and am trying to do a simple range search like this:
`gender:1 AND height:[120 TO 180]`
This should give me a male in the height range 120 to 180. But for some reason I am getting this exception:
`At least one range query boundary term must be non-empty term`
How do I debug this? Is this just a Zend_Search_Lucene bug?
+2
source to share
2 answers
This is an open bug in the Zend Framework Request Parser. Created in December 2008 with high priority ... and still pending.
0
source to share
First, you need to change the default parser to TextNum to resolve the number before looking
ZF2:
\ZendSearch\Lucene\Analysis\Analyzer\Analyzer::setDefault(new \ZendSearch\Lucene\Analysis\Analyzer\Common\TextNum\CaseInsensitive());
Second, your date field should be a keyword, not text.
0
source to share