I'm simply trying to get some data into ES to experiment with.
My JSON looks like this (randomly generated names):
{
"RECORDS":[
{
"fname":"Hyon",
"last":"Washko",
"addr":"18 Ratliff",
"City":"Cabot",
"State":"MN"
},
{
"fname":"Margie",
"last":"Dragovich",
"addr":"5 Liles Cp",
"City":"Idaho Fall",
"State":"NY"
},
]
}
Now, I named the file "names.json" on my Desktop folder and tried this command:
$ curl -H "Content-Type: application/json" http://localhost:9200/_bulk --data-binary @"/Users/me/Desktop/names.json"
--
Yet, I get this 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.transport.netty4.ByteBufStreamInput@743dc477; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@743dc477; 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.transport.netty4.ByteBufStreamInput@743dc477; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@743dc477; line: 1, column: 3]"},"status":500}
Baffled how to just get some data into JSON.
Can anyone tell me what's wrong with the import above?
Thanks.