src/Classes/Search.php
public function build()
    {

        $query_params = [];

        $query_params["query"] = $this->q;

        if($this->boost > 1) {
            $query_params["boost"] = $this->boost;
        }

        if(count($this->fields)){
            $query_params["fields"] = $this->fields;
        }

        $this->query->must[] = [
            "query_string" => $query_params
        ];
    }
public function build()
    {

        $query_params = [];

        $query_params["query"] = $this->q;

        if($this->boost > 1) {
            $query_params["boost"] = $this->boost;
        }

        if(count($this->fields)){
            $query_params["fields"] = $this->fields;
        }

        $this->query->must[] = [
            "query_string" => $query_params
        ];
    }
public function build ( ) { $ query_params = [ ] ; $ query_params [ "query" ] = $ this -> q ; if ( $ this -> boost > 1 ) { $ query_params [ "boost" ] = $ this -> boost ; } if ( count ( $ this -> fields ) ) { $ query_params [ "fields" ] = $ this -> fields ; } $ this -> query -> must [ ] = [ "query_string" => $ query_params ] ; }
Build the native query
Build the native query