public function rewrite(Zend_Search_Lucene_Interface $index)
    {
        $query = new Zend_Search_Lucene_Search_Query_Boolean();
        $query->setBoost($this->getBoost());

        foreach ($this->_subqueries as $subqueryId => $subquery) {
            $query->addSubquery(
                $subquery->rewrite($index),
                ($this->_signs === null)?  true : $this->_signs[$subqueryId]
            );
        }

        return $query;
    }