def METHOD_NAME(query):
    """
    Accepts one term and the name of the field.
    searx format: "key:value" e.g. city:berlin
    REF: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
    """
    try:
        key, value = query.split(':')
    except Exception as e:
        raise ValueError('query format must be key:value') from e
    return {'query': {'term': {key: value}}}