original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Adds a new bool query part to the query array