final move of files
[web.mtrack] / Zend / Search / Lucene / Search / Query / Preprocessing.php
1 <?php\r
2 /**\r
3  * Zend Framework\r
4  *\r
5  * LICENSE\r
6  *\r
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
14  *\r
15  * @category   Zend\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
21  */\r
22 \r
23 \r
24 /**\r
25  * Zend_Search_Lucene_Search_Query\r
26  */\r
27 require_once 'Zend/Search/Lucene/Search/Query.php';\r
28 \r
29 /**\r
30  * Zend_Search_Lucene_Search_Weight\r
31  */\r
32 require_once 'Zend/Search/Lucene/Search/Weight.php';\r
33 \r
34 \r
35 /**\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
38  *\r
39  * @category   Zend\r
40  * @package    Zend_Search_Lucene\r
41  * @subpackage Search\r
42  * @internal\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
45  */\r
46 abstract class Zend_Search_Lucene_Search_Query_Preprocessing extends Zend_Search_Lucene_Search_Query\r
47 {\r
48     /**\r
49      * Matched terms.\r
50      *\r
51      * Matched terms list.\r
52      * It's filled during rewrite operation and may be used for search result highlighting\r
53      *\r
54      * Array of Zend_Search_Lucene_Index_Term objects\r
55      *\r
56      * @var array\r
57      */\r
58     protected $_matches = null;\r
59 \r
60     /**\r
61      * Optimize query in the context of specified index\r
62      *\r
63      * @param Zend_Search_Lucene_Interface $index\r
64      * @return Zend_Search_Lucene_Search_Query\r
65      */\r
66     public function optimize(Zend_Search_Lucene_Interface $index)\r
67     {\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
70     }\r
71 \r
72     /**\r
73      * Constructs an appropriate Weight implementation for this query.\r
74      *\r
75      * @param Zend_Search_Lucene_Interface $reader\r
76      * @return Zend_Search_Lucene_Search_Weight\r
77      */\r
78     public function createWeight(Zend_Search_Lucene_Interface $reader)\r
79     {\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
82     }\r
83 \r
84     /**\r
85      * Execute query in context of index reader\r
86      * It also initializes necessary internal structures\r
87      *\r
88      * @param Zend_Search_Lucene_Interface $reader\r
89      * @param Zend_Search_Lucene_Index_DocsFilter|null $docsFilter\r
90      */\r
91     public function execute(Zend_Search_Lucene_Interface $reader, $docsFilter = null)\r
92     {\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
95     }\r
96 \r
97     /**\r
98      * Get document ids likely matching the query\r
99      *\r
100      * It's an array with document ids as keys (performance considerations)\r
101      *\r
102      * @return array\r
103      */\r
104     public function matchedDocs()\r
105     {\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
108     }\r
109 \r
110     /**\r
111      * Score specified document\r
112      *\r
113      * @param integer $docId\r
114      * @param Zend_Search_Lucene_Interface $reader\r
115      * @return float\r
116      */\r
117     public function score($docId, Zend_Search_Lucene_Interface $reader)\r
118     {\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
121     }\r
122 \r
123     /**\r
124      * Return query terms\r
125      *\r
126      * @return array\r
127      */\r
128     public function getQueryTerms()\r
129     {\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
132     }\r
133 }\r
134 \r