My goal is to write documents that I have from a csv file (around 700MB) but I received a BulkIndexError
Here is my code:
from haystack.document_stores.elasticsearch import ElasticsearchDocumentStore
document_store = ElasticsearchDocumentStore()
import pandas as pd
df = pd.read_csv('D:\BISMILLAH FYP\FINAL_CORD_DATA.csv')
dicts = df.to_dict('records')
final_dicts = []
for each in dicts:
tmp = {}
tmp['content'] = each.pop('body_text')
tmp['meta'] = each
final_dicts.append(tmp)
document_store.write_documents(final_dicts)
All the lines were fine to run, except the last line which got me the error I mentioned. Please let me know if there is any ways to resolve this. Thank you