protected function _initWeight(Zend_Search_Lucene_Interface $reader)
    {
        // Check, that it's a top-level query and query weight is not initialized yet.
        if ($this->_weight !== null) {
            return $this->_weight;
        }

        $this->createWeight($reader);
        $sum = $this->_weight->sumOfSquaredWeights();
        $queryNorm = $reader->getSimilarity()->queryNorm($sum);
        $this->_weight->normalize($queryNorm);
    }
protected function _initWeight(Zend_Search_Lucene_Interface $reader)
    {
        // Check, that it's a top-level query and query weight is not initialized yet.
        if ($this->_weight !== null) {
            return $this->_weight;
        }

        $this->createWeight($reader);
        $sum = $this->_weight->sumOfSquaredWeights();
        $queryNorm = $reader->getSimilarity()->queryNorm($sum);
        $this->_weight->normalize($queryNorm);
    }
protected function _initWeight ( Zend_Search_Lucene_Interface $ reader ) { // Check, that it's a top-level query and query weight is not initialized yet. if ( $ this -> _weight !== null ) { return $ this -> _weight ; } $ this -> createWeight ( $ reader ) ; $ sum = $ this -> _weight -> sumOfSquaredWeights ( ) ; $ queryNorm = $ reader -> getSimilarity ( ) -> queryNorm ( $ sum ) ; $ this -> _weight -> normalize ( $ queryNorm ) ; }
Constructs an initializes a Weight for a _top-level_query_.

@param Zend_Search_Lucene_Interface $reader
Constructs an initializes a Weight for a _top - level_query_ .