protected function addBool(array $query, $bool, $filter = false, array $params = []) {
        $filtered = $filter ? "filter" : "query";
        $key = "query.filtered.{$filtered}.bool.{$bool}";
        if ($filter) {
            $this->assertInitiated($key);
        }
        $this->query["query"]["filtered"][$filtered]["bool"][$bool][] = array_merge_recursive($query, $params);
    }
protected function addBool(array $query, $bool, $filter = false, array $params = []) {
        $filtered = $filter ? "filter" : "query";
        $key = "query.filtered.{$filtered}.bool.{$bool}";
        if ($filter) {
            $this->assertInitiated($key);
        }
        $this->query["query"]["filtered"][$filtered]["bool"][$bool][] = array_merge_recursive($query, $params);
    }
protected function addBool ( array $ query , $ bool , $ filter = false , array $ params = [ ] ) { $ filtered = $ filter ? "filter" : "query" ; $ key = "query.filtered.{$filtered}.bool.{$bool}" ; if ( $ filter ) { $ this -> assertInitiated ( $ key ) ; } $ this -> query [ "query" ] [ "filtered" ] [ $ filtered ] [ "bool" ] [ $ bool ] [ ] = array_merge_recursive ( $ query , $ params ) ; }
Adds a new bool query part to the query array

@param array $query the bool query part to be added
@param string $bool the bool group (must, should, must_not)
@param boolean $filter weither to be added to the filter or the query party
@param array $params extra parameters for the query part (will be merged into the original part)

@return void
Adds a new bool query part to the query array