_boost; } /** * Sets the boost for this query clause to $boost. * * @param float $boost */ public function setBoost($boost) { $this->_boost = $boost; } /** * Score specified document * * @param integer $docId * @param Zend_Search_Lucene $reader * @return float */ abstract public function score($docId, $reader); /** * Constructs an appropriate Weight implementation for this query. * * @param Zend_Search_Lucene $reader * @return Zend_Search_Lucene_Search_Weight */ abstract protected function _createWeight($reader); /** * Constructs an initializes a Weight for a query. * * @param Zend_Search_Lucene $reader */ protected function _initWeight($reader) { $this->_weight = $this->_createWeight($reader); $sum = $this->_weight->sumOfSquaredWeights(); $queryNorm = $reader->getSimilarity()->queryNorm($sum); $this->_weight->normalize($queryNorm); } }