一、 refresh
官方文档:A refresh makes all operations performed on an index since the last refresh available for search. (意思是:将上一次刷新 后面的操作刷新缓存到指定索index上)
当向elasticsearch发送创建document索引请求的时候,document数据会先进入到index buffer之后,与此同时会将操作记录在translog之中,当发生refresh时(数据从index buffer中进入filesystem cache的过程)translog中的操作记录并不会被清除,而是当数据从filesystem cache中被写入磁盘之后才会将translog中清空。
Reflash操作允许我们在创建文档时能立即检索得到该文档,刷新索引
二、fresh
从filesystem cache写入磁盘的过程就是flush。translog中的操作记录会相应清除。
三、clear
将index buffer的缓存进行清空,这样将不会查询到数据。