ZF-4653: single character with wildcars search

Issue Type: Bug Created: 2008-10-20T16:26:36.000+0000 Last Updated: 2011-08-26T12:53:18.000+0000 Status: Resolved Fix version(s): - 1.11.10 (04/Aug/11)

Reporter: badkill (badkill) Assignee: Shaun Farrell (farrelley) Tags: - Zend_Search_Lucene

  • zf-crteam-padraic
  • zf-crteam-priority

Related issues: Attachments:


Hello, i integrate zend lucene in my symfony application and i try to searching word... i have see that if i try to search a single character whith a wilcards (for example: a*) zend search lucene broke... I try to understand if this is only my problem or if is a zend_search_lucene problem, and i've try on your zend framework site:

if you search "a*" the result is a blank page....…

in a devzone too:*


Posted by Shaun Farrell (farrelley) on 2011-08-26T12:09:44.000+0000

This is because default behavior of Zend_Search_Lucene throws an exception if you search with wildcard character not followed by 3 non wild card characters.

You should catch this exception and handle it.


<pre class="highlight"> 
// Fail
$results = $index->find("a*"); //At least 3 non-wildcard characters are required at the beginning of pattern.

$results = $index->find("aa*"); //At least 3 non-wildcard characters are required at the beginning of pattern.

$results = $index->find("aaa*");

Posted by Shaun Farrell (farrelley) on 2011-08-26T12:53:18.000+0000

Works as designed. Exception is thrown due to 3 non wildcard characters before wildcard.

Have you found an issue?

See the Overview section for more details.


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

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