Issues

ZF-6825: Query parser ignores

Description

Given the wildcard search term with only a single letter prefiex (such as "b*, or with a field name such as "name:b*") then the query parser ignores the prefix letter.

Given "name:b*" Zend_Search_Lucene_Search_QueryParser::parse will return:

object(Zend_Search_Lucene_Search_Query_Boolean)[69] private '_subqueries' => array 0 => object(Zend_Search_Lucene_Search_Query_Wildcard)[71] private '_pattern' => object(Zend_Search_Lucene_Index_Term)[70] public 'field' => string 'name' (length=4) public 'text' => string '*' (length=1)

Given two letters, such as name:be*, then it works as expected:

(object(Zend_Search_Lucene_Search_Query_Boolean)[69] private '_subqueries' => array 0 => object(Zend_Search_Lucene_Search_Query_Wildcard)[72] private '_pattern' => object(Zend_Search_Lucene_Index_Term)[70] public 'field' => string 'name' (length=4) public 'text' => string 'be*' (length=3)

The letters are also ignored if there is one either side of the wildcard ("a*a"), and only seem to be included if there are two together. I presume this is a bug in 1.7.3, but it could be down to a setting that I haven't seen in the documentation.

Comments

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.