Fix a bug in currentGenDocOffsetWithWord with respect to an empty feed, a=chris

Chris Pollett [2012-09-08 22:Sep:th]
Fix a bug in currentGenDocOffsetWithWord with respect to an empty feed, a=chris
Filename
lib/index_bundle_iterators/intersect_iterator.php
lib/index_bundle_iterators/word_iterator.php
diff --git a/lib/index_bundle_iterators/intersect_iterator.php b/lib/index_bundle_iterators/intersect_iterator.php
index 5c45f4069..6ebffb50f 100644
--- a/lib/index_bundle_iterators/intersect_iterator.php
+++ b/lib/index_bundle_iterators/intersect_iterator.php
@@ -176,7 +176,6 @@ class IntersectIterator extends IndexBundleIterator
     function findDocsWithWord()
     {
         $status = $this->syncGenDocOffsetsAmongstIterators();
-
         if($status == -1) {
             return -1;
         }
@@ -411,7 +410,6 @@ class IntersectIterator extends IndexBundleIterator
                         0]->currentGenDocOffsetWithWord()) == -1) {
             return -1;
         }
-
         $gen_doc_offset[0] = $biggest_gen_offset;
         $all_same = true;
         for($i = 1; $i < $this->num_iterators; $i++) {
diff --git a/lib/index_bundle_iterators/word_iterator.php b/lib/index_bundle_iterators/word_iterator.php
index 5ef67f173..c7e943637 100644
--- a/lib/index_bundle_iterators/word_iterator.php
+++ b/lib/index_bundle_iterators/word_iterator.php
@@ -181,7 +181,7 @@ class WordIterator extends IndexBundleIterator
         if($this->use_feeds) {
             $feed_shard = IndexManager::getIndex("feed");
             $this->feed_info = $feed_shard->getWordInfo($word_key, true);
-            if ($this->feed_info === false) {
+            if (!$this->feed_info) {
                 $this->feed_empty = true;
             } else {
                 $this->feed_empty = false;
@@ -491,7 +491,7 @@ class WordIterator extends IndexBundleIterator
             $this->generation_pointer >= $this->num_generations))) {
             return -1;
         }
-        if($this->using_feeds) {
+        if($feeds) {
             $index = IndexManager::getIndex("feed");
             return array(-1, $index->docOffsetFromPostingOffset(
                 $this->current_offset));
ViewGit