ZF-6825: Query parser ignores

Issue Type: Bug Created: 2009-05-27T09:54:24.000+0000 Last Updated: 2012-11-20T20:52:53.000+0000 Status: Closed Fix version(s): Reporter: Ben Dowling (bendowling) Assignee: None Tags: - Zend_Search_Lucene

Related issues: Attachments:


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.


Posted by Rob Allen (rob) on 2012-11-20T20:52:53.000+0000

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.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.