Kalyanam Rajashree
Kalyanam Rajashree

Reputation: 712

importing json file to elasticsearch

I have used

curl -XPOST "http://localhost:9200/<my_index_name>" -d @<absolute_path_to_my_json_file>

Then when I tried to get the data using

curl -XGET "http://localhost:9200/<my_index_name>"

its giving me data only for first line of my json file. (including other stuff also - settings, mappings,alias etc). But why is it not able to load the entire json file ? BTW, I am using ES 2.4.0. If I have to use bulk, what is the syntax ?

Upvotes: 1

Views: 9312

Answers (2)

ssdev
ssdev

Reputation: 11

Try using these curl -XPUT "http://localhost:9200/<my_index_name>" -d @<absolute_path_to_my_json_file>

Upvotes: 1

dadoonet
dadoonet

Reputation: 14512

GET index does not search actually.

You have also to run something like GET index/_search.

Upvotes: 0

Related Questions