New to ELK stack. Trying to explore bulk indexing. I tried this command from Kibana.
I get Validation Failed error. I didn't make this up. I got it from elastick.co site for practice.
{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: index is missing;2: type is missing;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: index is missing;2: type is missing;"
},
"status": 400
}
POST _bulk
{"index":{"_id":"1"}}
{"account_number":1,"balance":39225,"firstname":"Amber","lastname":"Duke","age":32,"gender":"M","address":"880 Holmes Lane","employer":"Pyrami","email":"amberduke@pyrami.com","city":"Brogan","state":"IL"}
{"index":{"_id":"6"}}
{"account_number":6,"balance":5686,"firstname":"Hattie","lastname":"Bond","age":36,"gender":"M","address":"671 Bristol Street","employer":"Netagy","email":"hattiebond@netagy.com","city":"Dante","state":"TN"}
Note the endpoint used in the example: POST localhost:9200/bank/account/_bulk. In your code, your endpoint is POST _bulk. If you specify the index and type in the url, then you don't need it in the query.
And replace <index_name> with the name of the index you want these documents to live and replace <type_name> with the name of the type for these documents (if you don't know what this should be, I'd recommend just using doc)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.