Zend_Search_Lucene and range search
I have a bunch of int key fields in my index and trying to do a simple range search like this:
`gender:1 AND height:[120 TO 180]`
This should give me male in the height 开发者_如何转开发range 120 to 180. But for some reason i get this exception:
`At least one range query boundary term must be non-empty term`
How would i debug this? Is it just Zend_Search_Lucene being buggy?
This is an open bug in the query parser of the Zend Framework. Created in december 2008 with high priority... and still unsolved.
First, you have to change default Analyzer to TextNum to allow number before finding
ZF2:
\ZendSearch\Lucene\Analysis\Analyzer\Analyzer::setDefault(new \ZendSearch\Lucene\Analysis\Analyzer\Common\TextNum\CaseInsensitive());
Second, your date field MUST be a keyword, not text.
精彩评论