I'm getting the following error:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Malformed action/metadata line [1], expected START_OBJECT or
END_OBJECT but found [VALUE_STRING]"
}
],
"type" : "illegal_argument_exception",
"reason" : "Malformed action/metadata line [1], expected START_OBJECT or END
_OBJECT but found [VALUE_STRING]"
},
"status" : 400
}
The index myindex already exists.
Any help will be appreciated. It is probably something very simple.
Actually, I found a site that answered my question.
I added a line {"index" : { } } before each line of actual json data, plus I made sure to have a newline at the end of the file. My curl command that worked looked like:
curl -H "Content-Type:application/x-ndjson" -XPOST "http://localhost:9200/myindex/_bulk?pretty" --data-binary @"05312019.txt"
Thank you for getting back to me. I was beginning to wonder if anyone even reads these posts.
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.