ZF-1376: Error in sample code of section - Query Parsing


Section in the manual provides the following sample code:

$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


Assigning to Alexander.


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 .

Fixed with SVN-7875