Browse Source

Zend_Search_Lucene: fixed bug in terms frequency requesting procedure. Fixes [ZF-5545].

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22723 44c647ce-9c0f-0410-b52a-842ac1e357ba
alexander 15 years ago
parent
commit
6ccc40144f
1 changed files with 4 additions and 2 deletions
  1. 4 2
      library/Zend/Search/Lucene/Index/SegmentInfo.php

+ 4 - 2
library/Zend/Search/Lucene/Index/SegmentInfo.php

@@ -1113,8 +1113,9 @@ class Zend_Search_Lucene_Index_SegmentInfo implements Zend_Search_Lucene_Index_T
                             }
                         } else {
                             $docId += $docDelta/2;
+                            $freq = $frqFile->readVInt();
                             if (isset($filter[$docId])) {
-                                $result[$shift + $docId] = $frqFile->readVInt();
+                                $result[$shift + $docId] = $freq;
                                 $updatedFilterData[$docId] = 1; // 1 is just a some constant value, so we don't need additional var dereference here
                             }
                         }
@@ -1135,8 +1136,9 @@ class Zend_Search_Lucene_Index_SegmentInfo implements Zend_Search_Lucene_Index_T
                             }
                         } else {
                             $docId += $docDelta/2;
+                            $freq = $frqFile->readVInt();
                             if (isset($filter[$docId])) {
-                                $result[$shift + $docId] = $frqFile->readVInt();
+                                $result[$shift + $docId] = $freq;
                                 $updatedFilterData[$docId] = 1; // 1 is just some constant value, so we don't need additional var dereference here
                             }
                         }