Elasticsearch系列篇之删除索引
来源:互联网 发布:.域名的续费是怎么回事 编辑:程序博客网 时间:2024/05/29 10:56
Elasticsearch删除索引
Elasticsearch可以删除索引,但是不能像数据库一样直接删除type,如果想要删除type有两种方式
a.删除index,这样会把所有该index的所有的type都会删除
b.重新创建一个新的type,使用新的type,这种方式安全一点
如果一个index下面只有一个type,那么就可以直接删除index
如果一个index下面有多个type ,那么删除一个type的时候就要考虑到其他的type
删除索引twitter
curl -XDELETE http://localhost:9200/twitter
使用通配符
删除所有的索引
curl -XDELETE http://localhost:9200/_all 或 curl -XDELETE http://localhost:9200/*
_all ,* 通配所有的索引
通常不建议使用通配符,误删了后果就很严重了,所有的index都被删除了
一次删除多个索引
删除twitter,my_index两个索引,中间用逗号隔开
curl -XDELETE http://localhost:9200/twitter,my_index
禁止通配符
为了安全起见,可以在配置文件中设置禁用_all和*通配符
action.destructive_requires_name = true
这样就不能使用_all和*了
0 1
- Elasticsearch系列篇之删除索引
- elasticsearch之删除索引
- Elasticsearch系列篇之创建索引
- Elasticsearch删除索引
- Elasticsearch之创建索引、删除索引、索引设置、配置分析器、自定义分析器。
- ElasticSearch Java Api -删除索引
- Elasticsearch 之 数据索引
- ElasticSearch之数据索引
- 分布式搜索elasticsearch java API 之(三)(四)------索引数据、删除索引数据
- elasticsearch之删除文档
- Elasticsearch系列篇之Get Index
- Elasticsearch系列篇之创建document
- Elasticsearch系列篇之Get document
- Elasticsearch系列篇之Delete document
- elasticsearch系列之排序
- elasticsearch之索引模块简述
- Elasticsearch之结构化索引。
- ElasticSearch Java Api(四) -删除索引
- jsp和servlet的区别
- 网络攻防之——数据库评估
- spring中搭建mogodb
- 关于auto_ptr
- zookeeper入门系列-理论基础-paxos协议
- Elasticsearch系列篇之删除索引
- Web API 版本控制的几种方式
- C++作业3
- Linux inotify功能及实现原理
- [蓝桥杯]-比酒量
- c++作业3
- 软连接
- c++作业3
- windows使用apache域名解析为https