original_string: public function getSimilarity()
      {
          if (count($this->_indices) == 0) {
              include_once 'Zend/Search/Lucene/Exception.php';
              throw new Zend_Search_Lucene_Exception('Indices list is empty');
          }
  
          $similarity = reset($this->_indices)->getSimilarity();
  
          foreach ($this->_indices as $index) {
              if ($index->getSimilarity() !== $similarity) {
                  include_once 'Zend/Search/Lucene/Exception.php';
                  throw new Zend_Search_Lucene_Exception('Indices have different similarity.');
              }
          }
  
          return $similarity;
      }
code: public function getSimilarity()
      {
          if (count($this->_indices) == 0) {
              include_once 'Zend/Search/Lucene/Exception.php';
              throw new Zend_Search_Lucene_Exception('Indices list is empty');
          }
  
          $similarity = reset($this->_indices)->getSimilarity();
  
          foreach ($this->_indices as $index) {
              if ($index->getSimilarity() !== $similarity) {
                  include_once 'Zend/Search/Lucene/Exception.php';
                  throw new Zend_Search_Lucene_Exception('Indices have different similarity.');
              }
          }
  
          return $similarity;
      }
code_tokens: public function getSimilarity ( ) { if ( count ( $ this -> _indices ) == 0 ) { include_once 'Zend/Search/Lucene/Exception.php' ; throw new Zend_Search_Lucene_Exception ( 'Indices list is empty' ) ; } $ similarity = reset ( $ this -> _indices ) -> getSimilarity ( ) ; foreach ( $ this -> _indices as $ index ) { if ( $ index -> getSimilarity ( ) !== $ similarity ) { include_once 'Zend/Search/Lucene/Exception.php' ; throw new Zend_Search_Lucene_Exception ( 'Indices have different similarity.' ) ; } } return $ similarity ; }
docstring: Retrive similarity used by index reader
  
  @return Zend_Search_Lucene_Search_Similarity
  @throws Zend_Search_Lucene_Exception
docstring_tokens: Retrive similarity used by index reader