阿坝网页设计公司,网站建设优化保定,嘉祥网站建设公司,浙江网站建设情况分析要将两个 Elasticsearch 实例中的同一个索引(/test_index)的数据合并到一个实例中,你可以按照以下步骤操作:
假设 Elasticsearch 1 (ES1) 和 Elasticsearch 2 (ES2) 都有相同的索引 /test_index。希望将 ES2 中的数据合并到 ES1 中。步骤 导出 ES2 的数据:使用 Elasticse…要将两个 Elasticsearch 实例中的同一个索引(/test_index)的数据合并到一个实例中,你可以按照以下步骤操作:
假设
Elasticsearch 1 (ES1) 和 Elasticsearch 2 (ES2) 都有相同的索引 /test_index。希望将 ES2 中的数据合并到 ES1 中。步骤
导出 ES2 的数据:使用 Elasticsearch 的 reindex 或者 scroll API 将数据从 ES2 导出。
你可以使用以下命令导出数据到文件:
elasticdump \--input=http://ES2:9200/test_index \--output=./test_index_data.json \--type=data注意: 使用 elasticdump 工具需要先安装 elasticdump。
导入数据到 ES1:将导出的数据文件导入到 ES1 的 /test_index。
elasticdump \--input