elasticsearch-py

How can I bulk upload JSON records to AWS OpenSearch index using a python client library?

How can I bulk upload JSON records to AWS OpenSearch index using a python client library? Question: I have a sufficiently large dataset that I would like to bulk index the JSON objects in AWS OpenSearch. I cannot see how to achieve this using any of: boto3, awswrangler, opensearch-py, elasticsearch, elasticsearch-py. Is there a way …

Total answers: 3

python elasticsearch client set mappings during create index

python elasticsearch client set mappings during create index Question: I can set mappings of index being created in curl command like this: { “mappings”:{ “logs_june”:{ “_timestamp”:{ “enabled”:”true” }, “properties”:{ “logdate”:{ “type”:”date”, “format”:”dd/MM/yyy HH:mm:ss” } } } } } But I need to create that index with elasticsearch client in python and set mappings.. what is …

Total answers: 4

How to update a document using elasticsearch-py?

How to update a document using elasticsearch-py? Question: Does anyone have an example for how to use update? It’s documented here, but the documentation is unclear and doesn’t include a working example. I’ve tried the following: coll = Elasticsearch() coll.update(index=’stories-test’,doc_type=’news’,id=hit.meta.id, body={“stanford”: 1, “parsed_sents”: parsed }) and I get elasticsearch.exceptions.RequestError: TransportError(400, u’ActionRequestValidationException[Validation Failed: 1: script or …

Total answers: 1