Testdaten in ElasticSearch 6.x einfügen
English
Deutsch
Wenn du nur einige Testdokumente in ElasticSearch 6.x einfügen möchtest, kannst du diesen einfachen Befehl verwenden:
insert_test_data.sh
curl -X POST "localhost:9200/mydocuments/_doc/" -H 'Content-Type: application/json' -d"
{
\"test\" : true,
\"post_date\" : \"$(date -Ins)\"
}"Führe diesen Befehl mehrmals aus, um mehrere Dokumente einzufügen!
Im Erfolgsfall wird dies eine Nachricht wie diese ausgeben
test_data.json
{"_index":"mydocuments","_type":"_doc","_id":"vCxB82kBn2U9QxlET2aG","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":0,"_primary_term":1}Also see the official docs on the indexing API.
Check out similar posts by category:
ElasticSearch
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow