Browse Source

Zend_Search_Lucene: minor fix. [ZF-2189] related.

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

+ 2 - 2
library/Zend/Search/Lucene.php

@@ -1147,7 +1147,7 @@ class Zend_Search_Lucene implements Zend_Search_Lucene_Interface
 
         if (count($subResults) == 0) {
             return array();
-        } else if (count($subResults) == 0) {
+        } else if (count($subResults) == 1) {
             // Index is optimized (only one segment)
             // Do not perform array reindexing
             return reset($subResults);
@@ -1181,7 +1181,7 @@ class Zend_Search_Lucene implements Zend_Search_Lucene_Interface
 
         if (count($subResults) == 0) {
             return array();
-        } else if (count($subResults) == 0) {
+        } else if (count($subResults) == 1) {
             // Index is optimized (only one segment)
             // Do not perform array reindexing
             return reset($subResults);