在 Mapping 里面,将 dynamic 参数设置成 strict 可以拒绝索引包含未知字段的文档。 此条 Tips 由 medcl 贡献。

缓存疑惑,match也会发生缓存行为吗

Elasticsearch | 作者 w_b | 发布于2021年11月01日 | 阅读数:734

缓存疑惑,按文档或相关资料,缓存分为node和shard级别,只有使用filter或者聚会或size为0等不需要评分的时候才会发生缓存,但是我测试了一下,只用match,前几次比较慢,在80ms左右,后面在查就40多ms了,单独的match也会缓存吗
已邀请:

trycatchfinal

赞同来自:

存在操作系统缓存,也就是非堆内存。
可以使用_cat/segments接口观察查询前后的segment文件在内存中的大小,column是size.memeory.
 
参考: https://www.elastic.co/guide/e ... .html
size.memory
Segments store some data into memory in order to be searchable efficiently. This column shows the number of bytes in memory that are used.

要回复问题请先登录注册