<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all_documents(index=INDEX_NAME):
 """ Get all documents from the given index. Returns full Elasticsearch objects so you can get metadata too. """

    query = {
        'query': {
            'match_all': {}
        }
    }
    for result in raw_query(query, index=index):
        yield result