public function execute()
    {
        $this->getFields();
        $this->getPagination();
        $this->getHighlight();
        $this->getSuggest();
        $this->getAggregations();
        $this->getSort();
        $this->getPayload();

        $params = [
            'index' => Utils::findKey($this->options, 'index', false) ?: $this->proxy->getIndex()->getName(),
            'type' => Utils::findKey($this->options, 'type', false) ?: $this->proxy->getType(),
            'body' => $this->payload
        ];

        return new Response($this->proxy->getModel(), $this->proxy->getClient()->search($params));
    }
public function execute()
    {
        $this->getFields();
        $this->getPagination();
        $this->getHighlight();
        $this->getSuggest();
        $this->getAggregations();
        $this->getSort();
        $this->getPayload();

        $params = [
            'index' => Utils::findKey($this->options, 'index', false) ?: $this->proxy->getIndex()->getName(),
            'type' => Utils::findKey($this->options, 'type', false) ?: $this->proxy->getType(),
            'body' => $this->payload
        ];

        return new Response($this->proxy->getModel(), $this->proxy->getClient()->search($params));
    }
public function execute ( ) { $ this -> getFields ( ) ; $ this -> getPagination ( ) ; $ this -> getHighlight ( ) ; $ this -> getSuggest ( ) ; $ this -> getAggregations ( ) ; $ this -> getSort ( ) ; $ this -> getPayload ( ) ; $ params = [ 'index' => Utils :: findKey ( $ this -> options , 'index' , false ) ? : $ this -> proxy -> getIndex ( ) -> getName ( ) , 'type' => Utils :: findKey ( $ this -> options , 'type' , false ) ? : $ this -> proxy -> getType ( ) , 'body' => $ this -> payload ] ; return new Response ( $ this -> proxy -> getModel ( ) , $ this -> proxy -> getClient ( ) -> search ( $ params ) ) ; }
Execute the query and return the response in a rich wrapper class

@return Response
Execute the query and return the response in a rich wrapper class