original_string: public function addTerm(Zend_Search_Lucene_Index_Term $term, $position = null) 
      {
          if ((count($this->_terms) != 0)&&(end($this->_terms)->field != $term->field)) {
              include_once 'Zend/Search/Lucene/Exception.php';
              throw new Zend_Search_Lucene_Exception(
                  'All phrase terms must be in the same field: ' .
                  $term->field . ':' . $term->text
              );
          }
  
          $this->_terms[] = $term;
          if ($position !== null) {
              $this->_offsets[] = $position;
          } else if (count($this->_offsets) != 0) {
              $this->_offsets[] = end($this->_offsets) + 1;
          } else {
              $this->_offsets[] = 0;
          }
      }
code: public function addTerm(Zend_Search_Lucene_Index_Term $term, $position = null) 
      {
          if ((count($this->_terms) != 0)&&(end($this->_terms)->field != $term->field)) {
              include_once 'Zend/Search/Lucene/Exception.php';
              throw new Zend_Search_Lucene_Exception(
                  'All phrase terms must be in the same field: ' .
                  $term->field . ':' . $term->text
              );
          }
  
          $this->_terms[] = $term;
          if ($position !== null) {
              $this->_offsets[] = $position;
          } else if (count($this->_offsets) != 0) {
              $this->_offsets[] = end($this->_offsets) + 1;
          } else {
              $this->_offsets[] = 0;
          }
      }
code_tokens: public function addTerm ( Zend_Search_Lucene_Index_Term $ term , $ position = null ) { if ( ( count ( $ this -> _terms ) != 0 ) && ( end ( $ this -> _terms ) -> field != $ term -> field ) ) { include_once 'Zend/Search/Lucene/Exception.php' ; throw new Zend_Search_Lucene_Exception ( 'All phrase terms must be in the same field: ' . $ term -> field . ':' . $ term -> text ) ; } $ this -> _terms [ ] = $ term ; if ( $ position !== null ) { $ this -> _offsets [ ] = $ position ; } else if ( count ( $ this -> _offsets ) != 0 ) { $ this -> _offsets [ ] = end ( $ this -> _offsets ) + 1 ; } else { $ this -> _offsets [ ] = 0 ; } }
docstring: Adds a term to the end of the query phrase.
  The relative position of the term is specified explicitly or the one immediately
  after the last term added.
  
  @param Zend_Search_Lucene_Index_Term $term
  @param integer                       $position
docstring_tokens: Adds a term to the end of the query phrase . The relative position of the term is specified explicitly or the one immediately after the last term added .