| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
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-2008 Zend Technologies USA Inc. (http://www.zend.com) 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 */ 21 22 23 /** Zend_Search_Lucene_Search_Query */ 24 require_once 'Zend/Search/Lucene/Search/Query.php'; 25 26 /** Zend_Search_Lucene_Search_Weight_Empty */ 27 require_once 'Zend/Search/Lucene/Search/Weight/Empty.php'; 28 29 30 /** 31 * The insignificant query returns empty result, but doesn't limit result set as a part of other queries 32 * 33 * @category Zend 34 * @package Zend_Search_Lucene 35 * @subpackage Search 36 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) 37 * @license http://framework.zend.com/license/new-bsd New BSD License 38 */ 39 class Zend_Search_Lucene_Search_Query_Insignificant extends Zend_Search_Lucene_Search_Query 40 { 41 /** 42 * Re-write query into primitive queries in the context of specified index 43 * 44 * @param Zend_Search_Lucene_Interface $index 45 * @return Zend_Search_Lucene_Search_Query 46 */ 47 public function rewrite(Zend_Search_Lucene_Interface $index) 48 { 49 return $this; 50 } 51 52 /** 53 * Optimize query in the context of specified index 54 * 55 * @param Zend_Search_Lucene_Interface $index 56 * @return Zend_Search_Lucene_Search_Query 57 */ 58 public function optimize(Zend_Search_Lucene_Interface $index) 59 { 60 return $this; 61 } 62 63 /** 64 * Constructs an appropriate Weight implementation for this query. 65 * 66 * @param Zend_Search_Lucene_Interface $reader 67 * @return Zend_Search_Lucene_Search_Weight 68 */ 69 public function createWeight(Zend_Search_Lucene_Interface $reader) 70 { 71 return new Zend_Search_Lucene_Search_Weight_Empty(); 72 } 73 74 /** 75 * Execute query in context of index reader 76 * It also initializes necessary internal structures 77 * 78 * @param Zend_Search_Lucene_Interface $reader 79 */ 80 public function execute(Zend_Search_Lucene_Interface $reader) 81 { 82 // Do nothing 83 } 84 85 /** 86 * Get document ids likely matching the query 87 * 88 * It's an array with document ids as keys (performance considerations) 89 * 90 * @return array 91 */ 92 public function matchedDocs() 93 { 94 return array(); 95 } 96 97 /** 98 * Score specified document 99 * 100 * @param integer $docId 101 * @param Zend_Search_Lucene_Interface $reader 102 * @return float 103 */ 104 public function score($docId, Zend_Search_Lucene_Interface $reader) 105 { 106 return 0; 107 } 108 109 /** 110 * Return query terms 111 * 112 * @return array 113 */ 114 public function getQueryTerms() 115 { 116 return array(); 117 } 118 119 /** 120 * Highlight query terms 121 * 122 * @param integer &$colorIndex 123 * @param Zend_Search_Lucene_Document_Html $doc 124 */ 125 public function highlightMatchesDOM(Zend_Search_Lucene_Document_Html $doc, &$colorIndex) 126 { 127 // Do nothing 128 } 129 130 /** 131 * Print a query 132 * 133 * @return string 134 */ 135 public function __toString() 136 { 137 return '<InsignificantQuery>'; 138 } 139 } 140
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |