Issues

ZF-7789: Zend lucene search result will lose some records when using the index created by java lucene

Issue Type: Bug Created: 2009-09-07T00:56:19.000+0000 Last Updated: 2010-08-20T11:08:31.000+0000 Status: Resolved Fix version(s): Reporter: Kevin (mincer) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Search_Lucene

Related issues: - ZF-5545

Attachments: - index.zip

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.

  1. copy the index files in attachment to "C:\index"
  2. 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);
  3. 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:

<pre class="highlight"> 
  $docsFilter = new Zend_Search_Lucene_Index_DocsFilter();

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

<pre class="highlight"> 
  $termDocs = $reader->termDocs($term, $docsFilter);

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts