import csv into elasticsearch

后端 未结 2 1731
后悔当初
后悔当初 2020-12-25 12:46

I\'m doing \"elastic search getting started\" tutorial. Unfortunatelly this tutorial doesn\'t cover first step which is importing csv database into elasticsearc

2条回答
  •  梦谈多话
    2020-12-25 13:24

    I'm the author of moshe/elasticsearch_loader
    I wrote ESL for this exact problem.
    You can download it with pip:

    pip install elasticsearch-loader
    

    And then you will be able to load csv files into elasticsearch by issuing:

    elasticsearch_loader --index incidents --type incident csv file1.csv
    

    Additionally, you can use custom id file by adding --id-field=document_id to the command line

提交回复
热议问题