コード例 #1
0
ファイル: Term.php プロジェクト: bizanto/Hooked
 /**
  * Transform entry to a subquery
  *
  * @param string $encoding
  * @return Zend_Search_Lucene_Search_Query
  * @throws Zend_Search_Lucene_Search_QueryParserException
  */
 public function getQuery($encoding)
 {
     if ($this->_fuzzyQuery) {
         /** Zend_Search_Lucene_Search_Query_Preprocessing_Fuzzy */
         require_once 'Zend/Search/Lucene/Search/Query/Preprocessing/Fuzzy.php';
         $query = new Zend_Search_Lucene_Search_Query_Preprocessing_Fuzzy($this->_term, $encoding, $this->_field !== null ? iconv($encoding, 'UTF-8', $this->_field) : null, $this->_similarity);
         $query->setBoost($this->_boost);
         return $query;
     }
     /** Zend_Search_Lucene_Search_Query_Preprocessing_Term */
     require_once 'Zend/Search/Lucene/Search/Query/Preprocessing/Term.php';
     $query = new Zend_Search_Lucene_Search_Query_Preprocessing_Term($this->_term, $encoding, $this->_field !== null ? iconv($encoding, 'UTF-8', $this->_field) : null);
     $query->setBoost($this->_boost);
     return $query;
 }
コード例 #2
0
ファイル: Term.php プロジェクト: VUW-SIM-FIS/emiemi
 /**
  * Transform entry to a subquery
  *
  * @param string $encoding
  * @return Zend_Search_Lucene_Search_Query
  * @throws Zend_Search_Lucene_Search_QueryParserException
  */
 public function getQuery($encoding)
 {
     if ($this->_fuzzyQuery) {
         $query = new Zend_Search_Lucene_Search_Query_Preprocessing_Fuzzy($this->_term, $encoding, $this->_field !== null ? iconv($encoding, 'UTF-8', $this->_field) : null, $this->_similarity);
         $query->setBoost($this->_boost);
         return $query;
     }
     $query = new Zend_Search_Lucene_Search_Query_Preprocessing_Term($this->_term, $encoding, $this->_field !== null ? iconv($encoding, 'UTF-8', $this->_field) : null);
     $query->setBoost($this->_boost);
     return $query;
 }