i'm getting timeout exception while i indexing huge json text.
sample code:
es.index(index="test", doc_type="test", body=jsonString)
So i tried to increase the timeout using
es.index(index="test", doc_type="test", body=jsonString, timeout=60)
But is this the only way to fix the problem? sometimes my JSON String will be 40 MB to 60 MB in size.
Update:
I tried below way to index using bulk, it failed.
helpers.bulk(es, jsonOutput, index="test-las", doc_type="test-las")
Log:
Traceback (most recent call last):
File "LasioParser.py", line 46, in <module>
helpers.bulk(es, jsonOutput, index="test-las", doc_type="test-las")
File "/usr/lib/python2.7/site-packages/elasticsearch/helpers/__init__.py", line 257, in bulk
for ok, item in streaming_bulk(client, actions, **kwargs):
File "/usr/lib/python2.7/site-packages/elasticsearch/helpers/__init__.py", line 192, in streaming_bulk
raise_on_error, **kwargs)
File "/usr/lib/python2.7/site-packages/elasticsearch/helpers/__init__.py", line 137, in _process_bulk_chunk
raise BulkIndexError('%i document(s) failed to index.' % len(errors), errors)
elasticsearch.helpers.BulkIndexError: (u'500 document(s) failed to index.', [{