简体   繁体   中英

How to select _id field for documents as a CSV column while drag-n-dropping CSV file in elasticsearch?

I am trying to add data to elasticsearch by uploading a CSV file. I want to select _id for elastic documents as values from a CSV column. How can I do that?

I can do it using logstash but I want to know if I can do it in above case? Thanks!

Once you import the file You can find the the "Advanced" tab of the file import page. Here you can edit the ingest pipeline. Add something like this at the end of the processors array, in my case the name of the column is "id"

{
  "set": {
    "field": "_id",
    "value": "{{id}}"
  }
}

have a look at the screenshot for your reference. 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM