zendframework/ZendSearch — pull request #8 by luciole75w (2013-10-21 03:20:08+00:00)
Title: a few fixes and additions for ZendSearch

Hello,

I use the lucene search module of the Zend Framework on a website for quite a while and i'm happy with that. Thank you for the php version by the way :)

Recently I decided to try out the refactored version of ZF2/ZendSearch to see if there was a feature I needed in the old ZF1 version, support for alternate terms (stems in my case) in exact phrase queries. The documentation (http://framework.zend.com/manual/1.12/en/zend.search.lucene.query-api.html#zend.search.lucene.queries.phrase-query) mentions synonyms at the same place but actually it is not implemented (at least in the latest RC).
So I added the feature and since it's useful for me, I thought it may be useful for others. Before putting it online, I tested the changes with my real site index (about 550 web pages) for both result accuracy and performances, didn't find any regression.

There are also a few other unrelated changes :
- UTF8 short words token filter (the regular ShortWords filter expects singlebyte characters)
- fix for a regression in SegmentInfo::termFreqs() (giving possibly wrong scores and php notices)
- fixes for unit tests giving false positives due to index directory cleanup (at least on my local server : Wamp 2 / PHP 5.4.3)

That's all. I hope you'll find something interesting to merge back in your branch. And if you need further information about my changes, feel free to ask.

Cheers,
Thierry