This minimal example inserts a single document into Elasticsearch running at http://localhost:9200
:
#!/usr/bin/env python3 from elasticsearch import Elasticsearch es = Elasticsearch() es.index(index="test-index", id=1, body={"test": 123})
This minimal example inserts a single document into Elasticsearch running at http://localhost:9200
:
#!/usr/bin/env python3 from elasticsearch import Elasticsearch es = Elasticsearch() es.index(index="test-index", id=1, body={"test": 123})
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow