import
[web.mtrack] / inc / lib / Zend / Search / Lucene / Search / QueryEntry.php
1 <?php
2 /**
3  * Zend Framework
4  *
5  * LICENSE
6  *
7  * This source file is subject to the new BSD license that is bundled
8  * with this package in the file LICENSE.txt.
9  * It is also available through the world-wide-web at this URL:
10  * http://framework.zend.com/license/new-bsd
11  * If you did not receive a copy of the license and are unable to
12  * obtain it through the world-wide-web, please send an email
13  * to license@zend.com so we can send you a copy immediately.
14  *
15  * @category   Zend
16  * @package    Zend_Search_Lucene
17  * @subpackage Search
18  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
20  * @version    $Id: QueryEntry.php 16971 2009-07-22 18:05:45Z mikaelkael $
21  */
22
23 /** Zend_Search_Lucene_Index_Term */
24 require_once 'Zend/Search/Lucene/Index/Term.php';
25
26 /** Zend_Search_Lucene_Search_QueryEntry_Term */
27 require_once 'Zend/Search/Lucene/Search/QueryEntry/Term.php';
28
29 /** Zend_Search_Lucene_Search_QueryEntry_Phrase */
30 require_once 'Zend/Search/Lucene/Search/QueryEntry/Phrase.php';
31
32 /** Zend_Search_Lucene_Search_QueryEntry_Subquery */
33 require_once 'Zend/Search/Lucene/Search/QueryEntry/Subquery.php';
34
35 /**
36  * @category   Zend
37  * @package    Zend_Search_Lucene
38  * @subpackage Search
39  * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
40  * @license    http://framework.zend.com/license/new-bsd     New BSD License
41  */
42 abstract class Zend_Search_Lucene_Search_QueryEntry
43 {
44     /**
45      * Query entry boost factor
46      *
47      * @var float
48      */
49     protected $_boost = 1.0;
50
51
52     /**
53      * Process modifier ('~')
54      *
55      * @param mixed $parameter
56      */
57     abstract public function processFuzzyProximityModifier($parameter = null);
58
59
60     /**
61      * Transform entry to a subquery
62      *
63      * @param string $encoding
64      * @return Zend_Search_Lucene_Search_Query
65      */
66     abstract public function getQuery($encoding);
67
68     /**
69      * Boost query entry
70      *
71      * @param float $boostFactor
72      */
73     public function boost($boostFactor)
74     {
75         $this->_boost *= $boostFactor;
76     }
77
78
79 }