src/Search.php
public function addQuery(BuilderInterface $query, $boolType = BoolQuery::MUST, $key = null)
    {
        $endpoint = $this->getEndpoint(QueryEndpoint::NAME);
        $endpoint->addToBool($query, $boolType, $key);

        return $this;
    }
public function addQuery(BuilderInterface $query, $boolType = BoolQuery::MUST, $key = null)
    {
        $endpoint = $this->getEndpoint(QueryEndpoint::NAME);
        $endpoint->addToBool($query, $boolType, $key);

        return $this;
    }
public function addQuery ( BuilderInterface $ query , $ boolType = BoolQuery :: MUST , $ key = null ) { $ endpoint = $ this -> getEndpoint ( QueryEndpoint :: NAME ) ; $ endpoint -> addToBool ( $ query , $ boolType , $ key ) ; return $ this ; }
Adds query to the search.

@param BuilderInterface $query
@param string           $boolType
@param string           $key

@return $this
Adds query to the search .