7 * This source file is subject to the new BSD license that is bundled
\r
8 * with this package in the file LICENSE.txt.
\r
9 * It is also available through the world-wide-web at this URL:
\r
10 * http://framework.zend.com/license/new-bsd
\r
11 * If you did not receive a copy of the license and are unable to
\r
12 * obtain it through the world-wide-web, please send an email
\r
13 * to license@zend.com so we can send you a copy immediately.
\r
16 * @package Zend_Search_Lucene
\r
17 * @subpackage Search
\r
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
\r
19 * @license http://framework.zend.com/license/new-bsd New BSD License
\r
20 * @version $Id: Preprocessing.php 16971 2009-07-22 18:05:45Z mikaelkael $
\r
25 * Zend_Search_Lucene_Search_Query
\r
27 require_once 'Zend/Search/Lucene/Search/Query.php';
\r
30 * Zend_Search_Lucene_Search_Weight
\r
32 require_once 'Zend/Search/Lucene/Search/Weight.php';
\r
36 * It's an internal abstract class intended to finalize ase a query processing after query parsing.
\r
37 * This type of query is not actually involved into query execution.
\r
40 * @package Zend_Search_Lucene
\r
41 * @subpackage Search
\r
43 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
\r
44 * @license http://framework.zend.com/license/new-bsd New BSD License
\r
46 abstract class Zend_Search_Lucene_Search_Query_Preprocessing extends Zend_Search_Lucene_Search_Query
\r
51 * Matched terms list.
\r
52 * It's filled during rewrite operation and may be used for search result highlighting
\r
54 * Array of Zend_Search_Lucene_Index_Term objects
\r
58 protected $_matches = null;
\r
61 * Optimize query in the context of specified index
\r
63 * @param Zend_Search_Lucene_Interface $index
\r
64 * @return Zend_Search_Lucene_Search_Query
\r
66 public function optimize(Zend_Search_Lucene_Interface $index)
\r
68 require_once 'Zend/Search/Lucene/Exception.php';
\r
69 throw new Zend_Search_Lucene_Exception('This query is not intended to be executed.');
\r
73 * Constructs an appropriate Weight implementation for this query.
\r
75 * @param Zend_Search_Lucene_Interface $reader
\r
76 * @return Zend_Search_Lucene_Search_Weight
\r
78 public function createWeight(Zend_Search_Lucene_Interface $reader)
\r
80 require_once 'Zend/Search/Lucene/Exception.php';
\r
81 throw new Zend_Search_Lucene_Exception('This query is not intended to be executed.');
\r
85 * Execute query in context of index reader
\r
86 * It also initializes necessary internal structures
\r
88 * @param Zend_Search_Lucene_Interface $reader
\r
89 * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter
\r
91 public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null)
\r
93 require_once 'Zend/Search/Lucene/Exception.php';
\r
94 throw new Zend_Search_Lucene_Exception('This query is not intended to be executed.');
\r
98 * Get document ids likely matching the query
\r
100 * It's an array with document ids as keys (performance considerations)
\r
104 public function matchedDocs()
\r
106 require_once 'Zend/Search/Lucene/Exception.php';
\r
107 throw new Zend_Search_Lucene_Exception('This query is not intended to be executed.');
\r
111 * Score specified document
\r
113 * @param integer $docId
\r
114 * @param Zend_Search_Lucene_Interface $reader
\r
117 public function score($docId, Zend_Search_Lucene_Interface $reader)
\r
119 require_once 'Zend/Search/Lucene/Exception.php';
\r
120 throw new Zend_Search_Lucene_Exception('This query is not intended to be executed.');
\r
124 * Return query terms
\r
128 public function getQueryTerms()
\r
130 require_once 'Zend/Search/Lucene/Exception.php';
\r
131 throw new Zend_Search_Lucene_Exception('Rewrite operation has to be done before retrieving query terms.');
\r