Importing datasets

I have just started learning elasticsearch. Can someone please explain me these lines:

curl -H "Content-Type: application/json" -XPOST 'localhost:9200/bank/account/_bulk?pretty&refresh' --data-binary "@accounts.json"
curl 'localhost:9200/_cat/indices?v'

These lines were on the link:
https://www.elastic.co/guide/en/elasticsearch/reference/current/_exploring_your_data.html

I was working on the console in my browser.How should I write these lines,without using "curl", and what url should I mention for "accounts.json".

Thanks in advance...

I was working on the console in my browser

What does it mean?
What kind of console is that? Are you speaking about Kibana console?

If so, just copy and paste curl -H "Content-Type: application/json" -XPOST 'localhost:9200/bank/account/_bulk?pretty&refresh' in Kibana console. It will be automatically transformed to something like:

POST /bank/account/_bulk?pretty&refresh

Then just open the content of the accounts.json file in notepad or whatever text editor. Copy its content just after the POST /bank/account/_bulk?pretty&refresh line.

Then execute and you're done.

HTH

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.