es数据结构的迁徙

   1.命令cmd执行导mapping:./elasticdump --input=http://原服务器地址/索引 --output=http://新服务器地址/索引 --type=mapping    2.导数据导数据:./elasticdump --input=http://原服务器地址/索引 --output=http://新服务器地址/索引 --type=data3.备份索引数据./elasticdump --input=http://备份的服务器地址/索引 --output=C:\Users\clyyy\Desktop\北京云es\activities_mapping.json(备份的地址以及名称) --type=mapping

es查用命令 (curl命令和控制面板殊途同归)

 -X :指定http的申请形式,有HEAD、GET、POST、PUT、DELETE -d :指定要传输的数据 -H :指定http的申请头信息 -u :用户名1.依据id查问文章详情    curl -XGET 'http://es地址/索引/索引/_search?pretty' -u elastic:用户名  -H "Content-Type:application/json" -d '{"query": {"match": {"id":"id值"}},"size": 20}'2.新建字段  curl -XGET 'http://地址/索引/索引/_mapping?pretty' -u elastic:用户名  -H "Content-Type:application/json" -d '  {"properties":{"字段名称":{"type":"类型"}}}3.依据id删除数据curl -POST 'http://地址/索引/_delete_by_query?pretty' -u elastic:用户名  -H "Content-Type:application/json" -d '{"query":{"term":{"_id":"id值"} }}'4.删除某个索引下的所有数据(不删除索引构造)curl -POST 'http://地址/索引/_delete_by_query?pretty' -u elastic:用户名  -H "Content-Type:application/json" -d '{"query": {"match_all": {} }}'