Zend Framework

Error in sample code of section 27.3.1.1 - Query Parsing

Details

  • Type: Docs:  Problem Docs: Problem
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.9.3
  • Fix Version/s: 1.0.0 RC1, 1.0.4
  • Component/s: Zend_Search_Lucene
  • Labels:
    None
  • Language:
    English

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

Activity

Hide
Bill Karwin added a comment -

Assigning to Alexander.

Show
Bill Karwin added a comment - Assigning to Alexander.
Hide
Alexander Veremyev added a comment -

Fixed

Show
Alexander Veremyev added a comment - Fixed
Hide
Wojciech Naruniec added a comment -

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 .

Show
Wojciech Naruniec added a comment - 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 .
Hide
Thomas Weidner added a comment -

Fixed with SVN-7875

Show
Thomas Weidner added a comment - Fixed with SVN-7875

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: