src/Query.php
public function query()
    {

        $query = [];

        $query["index"] = $this->getIndex();

        if ($this->getType()) {
            $query["type"] = $this->getType();
        }

        if ($this->model && $this->useGlobalScopes) {
            $this->model->boot($this);
        }

        $query["body"] = $this->getBody();

        $query["from"] = $this->getSkip();

        $query["size"] = $this->getTake();

        if (count($this->ignores)) {
            $query["client"] = ['ignore' => $this->ignores];
        }

        $search_type = $this->getSearchType();

        if ($search_type) {
            $query["search_type"] = $search_type;
        }

        $scroll = $this->getScroll();

        if ($scroll) {
            $query["scroll"] = $scroll;
        }

        return $query;
    }
public function query()
    {

        $query = [];

        $query["index"] = $this->getIndex();

        if ($this->getType()) {
            $query["type"] = $this->getType();
        }

        if ($this->model && $this->useGlobalScopes) {
            $this->model->boot($this);
        }

        $query["body"] = $this->getBody();

        $query["from"] = $this->getSkip();

        $query["size"] = $this->getTake();

        if (count($this->ignores)) {
            $query["client"] = ['ignore' => $this->ignores];
        }

        $search_type = $this->getSearchType();

        if ($search_type) {
            $query["search_type"] = $search_type;
        }

        $scroll = $this->getScroll();

        if ($scroll) {
            $query["scroll"] = $scroll;
        }

        return $query;
    }
public function query ( ) { $ query = [ ] ; $ query [ "index" ] = $ this -> getIndex ( ) ; if ( $ this -> getType ( ) ) { $ query [ "type" ] = $ this -> getType ( ) ; } if ( $ this -> model && $ this -> useGlobalScopes ) { $ this -> model -> boot ( $ this ) ; } $ query [ "body" ] = $ this -> getBody ( ) ; $ query [ "from" ] = $ this -> getSkip ( ) ; $ query [ "size" ] = $ this -> getTake ( ) ; if ( count ( $ this -> ignores ) ) { $ query [ "client" ] = [ 'ignore' => $ this -> ignores ] ; } $ search_type = $ this -> getSearchType ( ) ; if ( $ search_type ) { $ query [ "search_type" ] = $ search_type ; } $ scroll = $ this -> getScroll ( ) ; if ( $ scroll ) { $ query [ "scroll" ] = $ scroll ; } return $ query ; }
Generate the query to be executed
@return array
Generate the query to be executed