ZF-1376: Error in sample code of section 27.3.1.1 - Query Parsing
Description
Section 27.3.1.1 in the manual provides the following sample code:
<?php
$userQuery = Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
$pathTerm = new Zend_Search_Lucene_Index_Term('/data/doc_dir/' . $filename, 'path');
$pathQuery = new Zend_Search_Query_Term($pathTerm);
$query = new Zend_Search_Query_Boolean();
$query->addSubquery($userQuery, true /* required */);
$query->addSubquery($pathQuery, true /* required */);
$hits = $index->find($query);
However, there is no such class as Zend_Search_Query_Term - this should be changed with Zend_Search_Lucene_Search_Query_Term
Comments
Posted by Bill Karwin (bkarwin) on 2007-05-15T12:14:40.000+0000
Assigning to Alexander.
Posted by Alexander Veremyev (alexander) on 2007-05-23T04:45:30.000+0000
Fixed
Posted by Wojciech Naruniec (wojciech) on 2007-12-03T03:31:51.000+0000
Example is still buggy. There is an another mistake, in Zend_Search_Query_Boolean class name. Name of this class should be changed to Zend_Search_Lucene_Search_Query_Boolean .
Posted by Thomas Weidner (thomas) on 2008-02-08T15:53:37.000+0000
Fixed with SVN-7875