ZF-6290: Zend_Search_Lucene doesn't permit "*" queries
Description
In version 1.7.8 i noticed that the framework gives a Zend_Search_Lucene exception when i try to do a search with only the asterix wildcard. Why? I should be able to use this type of search to get all the data in the index
Comments
Posted by Matt Schraeder (frozen-solid) on 2009-04-17T06:19:08.000+0000
This is present both in 1.7.7 and 1.7.8. Each term needs to have at least 3 characters alongside the wild card in order to work. So the search "ha" will fail, but "har" works fine. The easiest work around is to just make sure each term with a wildcard in it has at least 3 characters. It is still a rather large hassle.
Posted by Mark (skyblaze) on 2009-04-17T06:29:05.000+0000
i Know i have to digit at least 3 characters with the wildcard term but why this behaviour? I mean i know this is not the same as in the original lucene library, is this right? Like this i can't do a search for all data with lucene an i think this is a great lack.
Posted by Alexander Veremyev (alexander) on 2009-04-30T02:19:26.000+0000
Required prefix length can be altered using Zend_Search_Lucene_Search_Query_Wildcard::setMinPrefixLength($minPrefixLength) method (and retrieved using Zend_Search_Lucene_Search_Query_Wildcard::getMinPrefixLength()).
Documentation is just updated.