-1

I am new to Elasticsearch, I would like to know whether we can transfer data in to Elasticsearch using JSON file.

Please help me with the process if its there, I tried doing like below:

curl -XGET "http://localhost:9200/_bulk --databinary @shakespeare.json"

But I am getting an error "could not connect to host".

Antonio Val
  • 3,200
  • 1
  • 14
  • 27
  • This answer might help: http://stackoverflow.com/questions/34670624/kibana-cant-import-shakespeare-json-on-sense-web-plugin/34672449#34672449 – Val Dec 21 '16 at 12:29

1 Answers1

0

Try below curl command.

curl -s -XPOST "http://localhost:9200/<indexName>/<indexType>/_bulk?pretty" --data-binary "@shakespeare.json"
vinod_vh
  • 1,021
  • 11
  • 16