private function createElasticSearchQuery(array $params, $operator = 'AND')
    {
        $filteredParams = [];
        foreach ($params as $name => $value) {
            if (empty($name) || empty($value)) {
                continue;
            }

            $filteredParams[] = "$name:$value";
        }

        return implode(" $operator ", $filteredParams);
    }