src/QueryBuilder/Filters/Filter.php
public function mergeQuery(array $query)
    {
        $types = [
            Filter::MERGE_AND => 'must',
            Filter::MERGE_OR => 'should'
        ];

        $type = $this->getMergeType();

        $query['body']['filter']['bool'][$types[$type]][] = $this->makeQuery();

        return $query;
    }
public function mergeQuery(array $query)
    {
        $types = [
            Filter::MERGE_AND => 'must',
            Filter::MERGE_OR => 'should'
        ];

        $type = $this->getMergeType();

        $query['body']['filter']['bool'][$types[$type]][] = $this->makeQuery();

        return $query;
    }
public function mergeQuery ( array $ query ) { $ types = [ Filter :: MERGE_AND => 'must' , Filter :: MERGE_OR => 'should' ] ; $ type = $ this -> getMergeType ( ) ; $ query [ 'body' ] [ 'filter' ] [ 'bool' ] [ $ types [ $ type ] ] [ ] = $ this -> makeQuery ( ) ; return $ query ; }
Merges elastcisearch query with current filter query.

@param array $query Elastcisearch query.
@return array Merged elasticsearch query.
Merges elastcisearch query with current filter query .