ZF-6290: Zend_Search_Lucene doesn't permit "*" queries


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


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.

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.

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.