app/bulk.py
def bulk_download(ids):
    """
    Construct ElasticSearch query for all files, return tablib Dataset.
    :param ids:
    :return tablib.Dataset:
    """
    data = tablib.Dataset(headers=['title', 'text'])

    for doc_id in ids:
        # Grab file for doc_id
        r = es.get(index=es_index, doc_type="attachment", id=doc_id,
                   fields=['title', 'file'])
        
        f = r['fields']
        data.append((f['title'][0], f['file'][0]))
    
    # return file
    return data

    Construct ElasticSearch query for all files, return tablib Dataset.
    :param ids:
    :return tablib.Dataset:
    
Construct ElasticSearch query for all files, return tablib Dataset.
Construct ElasticSearch query for all files return tablib Dataset .
def bulk_download(ids):
    data = tablib.Dataset(headers=['title', 'text'])
    for doc_id in ids:
        r = es.get(index=es_index, doc_type="attachment", id=doc_id,
                   fields=['title', 'file'])
        f = r['fields']
        data.append((f['title'][0], f['file'][0]))
    return data
def bulk_download ( ids ) : data = tablib . Dataset ( headers = [ 'title' , 'text' ] ) for doc_id in ids : r = es . get ( index = es_index , doc_type = "attachment" , id = doc_id , fields = [ 'title' , 'file' ] ) f = r [ 'fields' ] data . append ( ( f [ 'title' ] [ 0 ] , f [ 'file' ] [ 0 ] ) ) return data
Construct ElasticSearch query for all files, return tablib Dataset.
Construct ElasticSearch query for all files return tablib Dataset .
"""
    Construct ElasticSearch query for all files, return tablib Dataset.
    :param ids:
    :return tablib.Dataset:
    """ # Grab file for doc_id # return file
None
tablib.Dataset
ids
None