A note on Lucene Search

Zend Lucene Search seems to be pretty good alternative to Sphinx. The biggest advantage is the fact that you can add/remove indexes on the fly and add different DB fields into index easily.

One thing which is not really mentioned in their manual – when you use wildcard for terms search you are limited to 3 chars by default. It’s easy to change though (will affect indexation speed/index size of course):


* Minimum term prefix length (number of minimum non-wildcard characters)
private static $_minPrefixLength = 3;

So updating value of _minPrefixLength you can change this behaviour.

Leave a Reply

Your email address will not be published. Required fields are marked *