Issues

ZF-7389: Phrase Query words in one position

Description

In manual i read this:

Phrases can also contain gaps or terms in the same places; they can be generated by the analyzer for different purposes. For example, a term can be duplicated to increase the term its weight, or several synonyms can be placed into a single position.

But when i do this:

$query = new Zend_Search_Lucene_Search_Query_Phrase(); $query->addTerm(new Zend_Search_Lucene_Index_Term('word1'), 0); $query->addTerm(new Zend_Search_Lucene_Index_Term('word2synonyms'), 0); $hits = $index->find($query);

Result is zero.

Comments

I stumbled over this, too when doing ZF-7738.

That patch also changes Zend_Search_Lucene_Search_Query_Phrase to handle multiple alternatives for a single position.

Gaps in a phrase were already supported AFAIK, so that should be no problem.

If ZF-7738 gets incorporated, this bug should be fixed, too.

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.