is there any way to import a json file(contains 100 documents) in elasticsearch server.?

前端 未结 9 1701
孤街浪徒
孤街浪徒 2020-12-04 10:39

Is there any way to import a JSON file (contains 100 documents) in elasticsearch server? I want to import a big json file into es-server..

9条回答
  •  抹茶落季
    2020-12-04 10:45

    Stream2es is the easiest way IMO.

    e.g. assuming a file "some.json" containing a list of JSON documents, one per line:

    curl -O download.elasticsearch.org/stream2es/stream2es; chmod +x stream2es
    cat some.json | ./stream2es stdin --target "http://localhost:9200/my_index/my_type
    

提交回复
热议问题