/** * Overrides constructor : gives the ability to pass the index name in the first param. * * @param array $body Request body. * @param array $options Request options * @param Simples_Transport $transport Transport client */ public function __construct($body = null, $options = null, Simples_Transport $transport = null) { if (isset($body['type'])) { $options['type'] = $body['type']; unset($body['type']); } parent::__construct($body, $options, $transport); }
/** * Constructor. * * @param mixed $body Request body * @param array $options Array of options * @param Simples_Transport $transport ES client instance */ public function __construct($body = null, $options = null, Simples_Transport $transport = null) { // Builders $this->_query = new Simples_Request_Search_Builder_Query(null, $this); $this->_filters = new Simples_Request_Search_Builder_Filters(null, $this); $this->_facets = new Simples_Request_Search_Builder_Facets(null, $this); // Simple query_string search : give it to builder. if (isset($body['query']) && is_string($body['query'])) { $this->_query->add($body['query']); unset($body['query']); } parent::__construct($body, $options, $transport); }