Issues

ZF-8284: Lucene MultiSearcher raises Fatal Error when calling numDocs() or count()

Issue Type: Bug Created: 2009-11-11T01:02:15.000+0000 Last Updated: 2011-06-10T17:03:09.000+0000 Status: Resolved Fix version(s): - 1.11.0 (02/Nov/10)

Reporter: Ralf Clau├čnitzer (zfissuetrackerralf) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Search_Lucene

Related issues: Attachments:

Description

Zend_Search_Lucene_MultiSearcher::numDocs() and ::count() perform method calls on array due to a mistyped variable name.

<pre class="highlight">
Index: library/Zend/Search/Lucene/MultiSearcher.php
===================================================================
--- library/Zend/Search/Lucene/MultiSearcher.php    (Revision 18929)
+++ library/Zend/Search/Lucene/MultiSearcher.php    (Arbeitskopie)
@@ -144,7 +144,7 @@
         $count = 0;
 
         foreach ($this->_indices as $index) {
-            $count += $this->_indices->count();
+            $count += $index->count();
         }
 
         return $count;
@@ -172,7 +172,7 @@
         $docs = 0;
 
         foreach ($this->_indices as $index) {
-            $docs += $this->_indices->numDocs();
+            $docs += $index->numDocs();
         }
 
         return $docs;

Comments

Posted by Ramon Henrique Ornelas (ramon) on 2010-09-18T11:55:41.000+0000

Fixed with r22967.

Have you found an issue?

See the Overview section for more details.

Copyright

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

Contacts