elasticsearch elasticdump罐';无法从文件导入数据
我尝试从json文件导入数据。使用如下命令:
elasticsearch elasticdump罐';无法从文件导入数据,
elasticsearch,
elasticsearch,我尝试从json文件导入数据。使用如下命令: elasticdump--input=2016-1-1-2016-7-31-2.json--output=http://localhost:9200/和如下格式: 我的备份文件几乎没有索引。但当我启动上面写的命令时,得到的结果如下: 2018年4月13日星期五13:36:44 GMT |开始倾倒 2018年4月13日星期五13:36:44 GMT |从源文件中获取了100个对象(偏移量:0) 2018年4月13日星期五13:36:44 GMT |向
elasticdump--input=2016-1-1-2016-7-31-2.json--output=http://localhost:9200/
和如下格式:
我的备份文件几乎没有索引。但当我启动上面写的命令时,得到的结果如下:
2018年4月13日星期五13:36:44 GMT |开始倾倒
2018年4月13日星期五13:36:44 GMT |从源文件中获取了100个对象(偏移量:0)
2018年4月13日星期五13:36:44 GMT |向目标elasticsearch发送了100个对象,0写道
2018年4月13日星期五13:36:44 GMT |从源文件中获取了291个对象(偏移量:100)
2018年4月13日星期五13:36:44 GMT |向目标elasticsearch发送了291个对象,0写道
2018年4月13日星期五13:36:44 GMT |从源文件中获取292个对象(偏移量:391)
2018年4月13日星期五13:36:45 GMT |向目标elasticsearch发送了292个对象,0写道
2018年4月13日星期五13:36:45 GMT |从源文件中获取293个对象(偏移量:683)
若我在URL中或通过--output index={index}设置索引名,那个么文件中的所有数据都会以类型分隔的方式转到该索引
我会感谢你的帮助 在elasticdump命令行中,尝试使用类型参数
--type=data
和indexName
例如elasticdump--input=2016-1-1-2016-7-31-2.json--output=http://localhost:9200/myIndex --type=data
使用Docker,您可以执行下一步操作:
docker run --name es-dump --rm -ti elasticdump/elasticsearch-dump \
--input=./2016-1-1-2016-7-31-2.json \
--output=http://localhost:9200/2016-1-1-2016-7-31-2 \
--type=data \
--limit=10000