After two days of trying back and forth to get any data index from a file I
need some help.
my mapping is:
{"base":{}}
my settings are:
{"base":{"settings":{"index.number_of_shards":"2","index.number_of_replicas":"1","index.version.created":"190899"}}}
what I'm trying to do is just loading a single doc from a file.
curl -XPOST 'http://localhost:9200/base/basedoc/' -d @mytest.json
the content of mytest.json is:
'{
"myid" : "1234567890",
"myname" : "this is my name",
"mycity" : "this is my city",
"mylocation" : "this is my location"
}'
I only get responses from curl like:
"Warning: Couldn't read data from file "mytest.json", this makes an empty
POST."
{"error":"RemoteTransportException[[node_2][inet[/129.70.12.37:9301]][index]];
nested: ElasticSearchParseException[Failed to derive xcontent from
(offset=102, length=0): [0, 0, 0, 110...
...0, 0]]; ","status":400}
If send it from command line if works:
curl -XPOST 'http://localhost:9200/base/basedoc/' -d '{
"myid" : "1234567890",
"myname" : "this is my name",
"mycity" : "this is my city",
"mylocation" : "this is my location"
}'
{"ok":true,"_index":"base","_type":"basedoc","_id":"OLMhBe_gT-y_6NykAIRikg","_version":1}
Any idea?
Bernd