import json


def search(es_object, index, search_params):
    """ Search the Elasticsearch index. """
    json_search = json.dumps(search_params)
    result = es_object.search(index=index, body=json_search)

    return result