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;
    }