ZF-7389: Phrase Query words in one position
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.