Hello,
I'm attempting to use the _bulk endpoint to post some data to Elasticsearch via a curl command but I continually receive the error:
Error
{
"error" : {
"root_cause" : [
{
"type" : "json_e_o_f_exception",
"reason" : "Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@2cd5df5; line: 1, column: 1])\n at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@2cd5df5; line: 1, column: 3]"
}
],
"type" : "json_e_o_f_exception",
"reason" : "Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@2cd5df5; line: 1, column: 1])\n at [Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@2cd5df5; line: 1, column: 3]"
},
"status" : 500
}
This is a copy of the JSON file I'm trying to POST. It's from AWS Rekognition:
JSON
{
"Labels": [
{
"Confidence": 99.86589813232422,
"Name": "Person"
},
{
"Confidence": 99.86589813232422,
"Name": "Audience"
},
{
"Confidence": 99.86589813232422,
"Name": "Crowd"
},
{
"Confidence": 99.86589813232422,
"Name": "Human"
},
{
"Confidence": 99.78563690185547,
"Name": "Accessories"
},
{
"Confidence": 99.78563690185547,
"Name": "Tie"
},
{
"Confidence": 99.78563690185547,
"Name": "Accessory"
},
{
"Confidence": 98.47319793701172,
"Name": "Speech"
},
{
"Confidence": 92.41165161132812,
"Name": "Apparel"
},
{
"Confidence": 92.41165161132812,
"Name": "Clothing"
},
{
"Confidence": 87.00628662109375,
"Name": "Coat"
},
{
"Confidence": 87.00628662109375,
"Name": "Overcoat"
},
{
"Confidence": 87.00628662109375,
"Name": "Suit"
},
{
"Confidence": 74.00171661376953,
"Name": "Blazer"
},
{
"Confidence": 74.00171661376953,
"Name": "Jacket"
},
{
"Confidence": 70.5894775390625,
"Name": "Lecture"
}
],
"ResponseMetadata":
{
"RetryAttempts": 0,
"HTTPStatusCode": 200,
"RequestId": "63dd30ad-4740-11e9-ad2e-954dd6f71e36",
"HTTPHeaders": {
"date": "Fri, 15 Mar 2019 16:35:50 GMT",
"x-amzn-requestid": "63dd30ad-4740-11e9-ad2e-954dd6f71e36",
"content-length": "2139",
"content-type": "application/x-amz-json-1.1",
"connection": "keep-alive"
}
}
}
I've already tried adding the new-line at the end of the document but the error will not stop. I'm relatively new to ES so if you can please try to break down the issue in the way a newbie would understand haha.