private function queryToAndExpression(LuceneQuery $query)
    {
        $span = new SpanExpression('AND');

        if (!$query->hasTrivialMainQuery())
            $span->addExpression($query->getMainQuery());

        $span->addExpressions($query->getFilterQueries());

        return $span;
    }
private function queryToAndExpression(LuceneQuery $query)
    {
        $span = new SpanExpression('AND');

        if (!$query->hasTrivialMainQuery())
            $span->addExpression($query->getMainQuery());

        $span->addExpressions($query->getFilterQueries());

        return $span;
    }
private function queryToAndExpression ( LuceneQuery $ query ) { $ span = new SpanExpression ( 'AND' ) ; if ( ! $ query -> hasTrivialMainQuery ( ) ) $ span -> addExpression ( $ query -> getMainQuery ( ) ) ; $ span -> addExpressions ( $ query -> getFilterQueries ( ) ) ; return $ span ; }
Convert a query to an AND expression

@param LuceneQuery $query
@return SpanExpression
Convert a query to an AND expression