ZF2-319: Lucene, multi index, id and document

Issue Type: Bug Created: 2012-05-25T20:16:29.000+0000 Last Updated: 2012-06-07T07:28:02.000+0000 Status: Closed Fix version(s): Reporter: BLANCHON Vincent (blanchon_vincent) Assignee: BLANCHON Vincent (blanchon_vincent) Tags: - Zend\Search

Related issues: Attachments:


In a multi index search, id are change with :

<pre class="highlight"> 
if ($indexShift != 0) {
      foreach ($hits as $hit) {
            $hit->id += $indexShift;

but id must be document id, so when i use

<pre class="highlight">
foreach($hits as $hit) {
        $document = $hit->getDocument();

there are an error.

So, to fix that, i have submitted a PR with update unit test to cover this case. In Query\Hit, id is a unique hit (no based on id document) and document_id is the doc id. So, no confusion and multi search run good.


Posted by BLANCHON Vincent (blanchon_vincent) on 2012-05-25T20:28:50.000+0000

PR to fix :

Posted by Maks 3w (maks3w) on 2012-06-04T15:48:59.000+0000

PR Merged

Have you found an issue?

See the Overview section for more details.


© 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.