Zend Framework

Zend_Search_Lucene doesn't permit "*" queries

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.7.8
  • Fix Version/s: 1.8.1
  • Component/s: Zend_Search_Lucene
  • Labels:
    None

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

Activity

Hide
Matt Schraeder added a comment -

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.

Show
Matt Schraeder added a comment - 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.
Hide
Mark added a comment -

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.

Show
Mark added a comment - 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.
Hide
Alexander Veremyev added a comment -

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.

Show
Alexander Veremyev added a comment - 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.

People

Vote (3)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: