Elasticsearch Python minimales index() / insert-Beispiel
English
Deutsch
Dieses minimale Beispiel fügt ein einzelnes Dokument in Elasticsearch ein, das unter http://localhost:9200 läuft:
es.index(index=“test-index”, id=1, body={“test”: 123})
es_index_example.py
#!/usr/bin/env python3
from elasticsearch import Elasticsearch
es = Elasticsearch()
es.index(index="test-index", id=1, body={"test": 123})Check out similar posts by category:
Databases, ElasticSearch, Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow