Elasticsearch Python minimal index() / insert example
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})