_termText = $text; $this->_startOffset = $start; $this->_endOffset = $end; $this->_positionIncrement = 1; } /** * positionIncrement setter * * @param integer $positionIncrement */ public function setPositionIncrement($positionIncrement) { $this->_positionIncrement = $positionIncrement; } /** * Returns the position increment of this Token. * * @return integer */ public function getPositionIncrement() { return $this->_positionIncrement; } /** * Returns the Token's term text. * * @return string */ public function getTermText() { return $this->_termText; } /** * Returns this Token's starting offset, the position of the first character * corresponding to this token in the source text. * * Note: * The difference between getEndOffset() and getStartOffset() may not be equal * to strlen(Zend_Search_Lucene_Analysis_Token::getTermText()), as the term text may have been altered * by a stemmer or some other filter. * * @return integer */ public function getStartOffset() { return $this->_startOffset; } /** * Returns this Token's ending offset, one greater than the position of the * last character corresponding to this token in the source text. * * @return integer */ public function getEndOffset() { return $this->_endOffset; } }