【问题标题】:Get all documents of the index in a file Elasticsearch 1.7获取文件中索引的所有文档 Elasticsearch 1.7
【发布时间】:2019-06-02 01:14:04
【问题描述】:

我在 1.7 版的 elasticsearch 中有一个大小为 25 GB 的索引,我想将它升级到 ES 5.5。但是由于文档具有 1.7 版本支持但 5.5 版本不支持的空字段名称(字符串),我想用 null 值替换所有空字符串。

由于其他人已经索引了数据,我不知道我是否能够找到源,以便我可以解决这个问题并再次索引数据。但是由于数据已经被索引,有什么方法可以在.json 文件中检索索引的所有文档,可用于修复错误并再次索引?

例如 - 检索 bulk.json 中的所有文档,然后在 ES 5.5 版本中使用通常的 post 请求再次索引它们。

我尝试了几种方法并查看了this,但没有找到任何可以将所有 25 GB 文档存储在单个 bulk.json 中的东西

如果有其他方法可以解决这个问题,请告诉我。

【问题讨论】:

    标签: json elasticsearch bigdata search-engine elasticsearch-5


    【解决方案1】:

    使用 ElasticDump,它会很简单

    npm install elasticdump
    

    那么,

    elasticdump \
        --input=http://production.es.com:9200/my_index \
        --output=/data/my_index_data.json \
        --type=data
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-18
      • 2023-04-07
      • 2020-07-17
      • 1970-01-01
      • 2011-11-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多