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


In a multi index search, id are change with :

if ($indexShift != 0) {
      foreach ($hits as $hit) {
            $hit->id += $indexShift;

but id must be document id, so when i use

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.


PR Merged