elasticsearch之缓存清除策略
来源:互联网 发布:最诡异的事情 知乎 编辑:程序博客网 时间:2024/06/08 13:34
前面提及了字段过滤缓存,那么与之相反的清楚缓存策略
单一索引缓存,多索引缓存和全部缓存的清理
1.清空全部缓存
curl localhost:9200/_cache/clear?pretty
{
"_shards" : {
"total" : 72,
"successful" : 72,
"failed" : 0
}
}
2.清除单一索引缓存
curl localhost:9200/index/_cache/clear?pretty
{
"_shards" : {
"total" : 2,
"successful" : 2,
"failed" : 0
}
}
3.清除多索引缓存
curl localhost:9200/index1,index2,index3/_cache/clear?pretty
{
"_shards" : {
"total" : 12,
"successful" : 12,
"failed" : 0
}
}
当然了清楚缓存时也可以添加参数使之清楚对用的缓存并非所有的
filter:此类缓存可以设置filter参数为true来清理,相反的不需要清楚此类缓存那么可以设置参数为false来保留此类缓存
field_data:此类缓存可以设置filter参数为true来清理,相反的不需要清楚此类缓存那么可以设置参数为false来保留此类缓存
bloom:此类缓存可以设置filter参数为true来清理(如果某种倒排索引格式中引用了bloom filter则可能使用此类缓存),相反的不需要清楚此类缓存那么可以设置参数为false来保留此类缓存
fields:清楚字段相关的缓存,可以为单个或者多个字段,多个字段的时候用逗号隔开(英文)
上述参数使用格式(可以使用一个或者多个参数)
curl localhost:9200/index/_cache/clear?pretty&filter=false&field_data=true&bloom=false&fields=tag,name
单一索引缓存,多索引缓存和全部缓存的清理
1.清空全部缓存
curl localhost:9200/_cache/clear?pretty
{
"_shards" : {
"total" : 72,
"successful" : 72,
"failed" : 0
}
}
2.清除单一索引缓存
curl localhost:9200/index/_cache/clear?pretty
{
"_shards" : {
"total" : 2,
"successful" : 2,
"failed" : 0
}
}
3.清除多索引缓存
curl localhost:9200/index1,index2,index3/_cache/clear?pretty
{
"_shards" : {
"total" : 12,
"successful" : 12,
"failed" : 0
}
}
当然了清楚缓存时也可以添加参数使之清楚对用的缓存并非所有的
filter:此类缓存可以设置filter参数为true来清理,相反的不需要清楚此类缓存那么可以设置参数为false来保留此类缓存
field_data:此类缓存可以设置filter参数为true来清理,相反的不需要清楚此类缓存那么可以设置参数为false来保留此类缓存
bloom:此类缓存可以设置filter参数为true来清理(如果某种倒排索引格式中引用了bloom filter则可能使用此类缓存),相反的不需要清楚此类缓存那么可以设置参数为false来保留此类缓存
fields:清楚字段相关的缓存,可以为单个或者多个字段,多个字段的时候用逗号隔开(英文)
上述参数使用格式(可以使用一个或者多个参数)
curl localhost:9200/index/_cache/clear?pretty&filter=false&field_data=true&bloom=false&fields=tag,name
阅读全文
0 0
- elasticsearch之缓存清除策略
- elasticsearch之字段缓存策略
- 缓存清除策略(1)
- iOS之清除缓存
- Spark之缓存策略
- jquery之清除ajax缓存
- flex4之清除图片缓存
- Android学习之 清除缓存
- iOS 开发之缓存清除
- WebStorm之如何清除缓存
- IOS 之 计算缓存,清除缓存
- varnish缓存策略之director
- 学习之http缓存策略
- MyBatis缓存策略之二级缓存
- MyBatis缓存策略之一级缓存
- Android开发之清除程序缓存
- Android开发之清除程序缓存
- iOS经典讲解之清除缓存文件
- Mac OS 安装 Vert.x 3
- 为什么学Java?是真的学Java吗?
- dfs学习之生成目标数方法
- 【前端开发实例】JQuery 使用 attr() 操作单选框(radio)、复选框(check)不能生效 -(一)
- Myeclipse破解码生成源码分享
- elasticsearch之缓存清除策略
- Github简单使用记录
- Win10更新后,Qt调试出现“20133, motion show time: 1502068371”
- 简谈序列化
- 持续集成:Jmeter+Maven+Jenkins自动化框架搭建(二):创建Maven工程及相应问题的解决方法
- RabbitMQ之Publish/Subscribe
- 文章标题
- Kafka 消息偏移量
- 如何自学Python?