def query_tw_field_exists(field):
    """ES query within documents pulled from Twitter API v2

    Args:
        field (str)

    Returns:
        ES query (JSON)

    """

    return {
        "query": {
            "bool": {
                "filter": [
                    {"term": {"doctype": "tweets2"}},
                    {"exists": {"field": field}},
                ]
            }
        }
    }