Command.php
public function search($options = [])
    {
        $query = $this->queryParts;
        if (empty($query)) {
            $query = '{}';
        }
        if (is_array($query)) {
            $query = Json::encode($query);
        }
        $url = [$this->index !== null ? $this->index : '_all'];
        if ($this->type !== null) {
            $url[] = $this->type;
        }
        $url[] = '_search';

        return $this->db->get($url, array_merge($this->options, $options), $query);
    }
public function search($options = [])
    {
        $query = $this->queryParts;
        if (empty($query)) {
            $query = '{}';
        }
        if (is_array($query)) {
            $query = Json::encode($query);
        }
        $url = [$this->index !== null ? $this->index : '_all'];
        if ($this->type !== null) {
            $url[] = $this->type;
        }
        $url[] = '_search';

        return $this->db->get($url, array_merge($this->options, $options), $query);
    }
public function search ( $ options = [ ] ) { $ query = $ this -> queryParts ; if ( empty ( $ query ) ) { $ query = '{}' ; } if ( is_array ( $ query ) ) { $ query = Json :: encode ( $ query ) ; } $ url = [ $ this -> index !== null ? $ this -> index : '_all' ] ; if ( $ this -> type !== null ) { $ url [ ] = $ this -> type ; } $ url [ ] = '_search' ; return $ this -> db -> get ( $ url , array_merge ( $ this -> options , $ options ) , $ query ) ; }
Sends a request to the _search API and returns the result
@param array $options
@return mixed
Sends a request to the _search API and returns the result