def spot_check_by_query(myinca, query, n_examples=5):
    """Spot-check a sample of docs.

    Args:
        myinca (object): INCA instance
        query (dict): elasticsearch query
        n_examples (int): number of examples to return

    Returns:
        list of documents (dict)

    """
    generator = myinca.database.document_generator(query=query)

    docs = []
    for n, doc in enumerate(generator):
        if n >= n_examples:
            break
        docs.append(doc)
    return docs