ZF-7789: Zend lucene search result will lose some records when using the index created by java lucene
Description
When I was using zend search to search a string cross multi-fields from the index created by java lucene 1.9.1, the search result missed one record. Please follow the steps below to reproduce it.
copy the index files in attachment to "C:\index"
write a php script including the following code $index = Zend_Search_Lucene::open("C:\index"); $query = Zend_Search_Lucene_Search_QueryParser::parse("contents:role AND tags:abc"); $hits = $index->find($query);
run it and you will see the search result count will be three. The correct count should be four.
Comments
Posted by Kevin (mincer) on 2009-09-07T00:58:51.000+0000
index file created by java lucene
Posted by Hying (hying) on 2010-01-13T00:32:35.000+0000
I have the same problem with an java created index. With luke.jar i can see the document contains words like 'behrenz'. But if i search for 'behr' with Zend, no results are found. The search for 'behre' or 'beh*' however returns the correct result.
Any ideas?
Posted by Hying (hying) on 2010-03-16T09:13:55.000+0000
Hi Kevin,
i think i resolved the problem for Version 1.9.7 to 1.10.2: add this line:
into the file: /Search/Lucene/Search/Query/MultiTerm.php at line 531 bevore the second foreach over '$this->_terms'
Not sure but i think the $docsFilter will be changend during the call
in line 345
Posted by Hying (hying) on 2010-03-16T09:27:39.000+0000
Sorry, it must be added in line 351 of the file /Search/Lucene/Search/Query/MultiTerm.php and not line 531
Posted by Alexander Veremyev (alexander) on 2010-08-20T11:05:35.000+0000
It seems it duplicates ZF-5545 issue
Posted by Alexander Veremyev (alexander) on 2010-08-20T11:08:30.000+0000
Resolved since duplicated issue is fixed