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;
    }
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;
    }
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 ; }
Retrive similarity used by index reader

@return Zend_Search_Lucene_Search_Similarity
@throws Zend_Search_Lucene_Exception
Retrive similarity used by index reader