Esempio n. 1
0
 /**
  * Process modifier parameter
  *
  * @throws Zend_Search_Lucene_Exception
  */
 public function processModifierParameter()
 {
     if ($this->_lastToken === null) {
         throw new Zend_Search_Lucene_Search_QueryParserException('Lexeme modifier parameter must follow lexeme modifier. Char position 0.');
     }
     switch ($this->_lastToken->type) {
         case Zend_Search_Lucene_Search_QueryToken::TT_FUZZY_PROX_MARK:
             $this->_context->processFuzzyProximityModifier($this->_currentToken->text);
             break;
         case Zend_Search_Lucene_Search_QueryToken::TT_BOOSTING_MARK:
             $this->_context->boost($this->_currentToken->text);
             break;
         default:
             // It's not a user input exception
             throw new Zend_Search_Lucene_Exception('Lexeme modifier parameter must follow lexeme modifier. Char position 0.');
     }
 }
Esempio n. 2
0
 /**
  * Process modifier parameter
  *
  * @throws Zend_Search_Lucene_Exception
  */
 public function processModifierParameter()
 {
     if ($this->_lastToken === null) {
         require_once sfConfig::get('sf_lib_dir') . '/modules/search/lib/Lucene/Search/QueryParserException.php';
         throw new Zend_Search_Lucene_Search_QueryParserException('Lexeme modifier parameter must follow lexeme modifier. Char position 0.');
     }
     switch ($this->_lastToken->type) {
         case Zend_Search_Lucene_Search_QueryToken::TT_FUZZY_PROX_MARK:
             $this->_context->processFuzzyProximityModifier($this->_currentToken->text);
             break;
         case Zend_Search_Lucene_Search_QueryToken::TT_BOOSTING_MARK:
             $this->_context->boost($this->_currentToken->text);
             break;
         default:
             // It's not a user input exception
             require_once sfConfig::get('sf_lib_dir') . '/modules/search/lib/Lucene/Exception.php';
             throw new Zend_Search_Lucene_Exception('Lexeme modifier parameter must follow lexeme modifier. Char position 0.');
     }
 }