SOLR中的queryResultCache [英] queryResultCache in SOLR

查看:72
本文介绍了SOLR中的queryResultCache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道solrconfig.xml中的queryResultCache是​​否盲目缓存任何内容,还是仅成功处理了结果?那就是我不想缓存失败的查询结果.

I am wondering if queryResultCache in solrconfig.xml caches anything blindly or only successfully handled results? That is I don't want to cache failed query's results.

我还可以在queryResultCache定义中看到一些名为"autowarmCount"的属性.

Also I see some attribute called "autowarmCount" in the queryResultCache definition.

<queryResultCache
   class="solr.LRUCache"
   size="16384"
   initialSize="16384"
   autowarmCount="128"/>

我可以指定自动预热查询吗?还是可以自己弄清楚要使用哪些查询?

Can I specify queries for auto warming up? Or can it figure out itself what queries to use?

推荐答案

queryResultCache将仅存储成功处理的结果中的结果.

The queryResultCache will only store results from successfully handled results.

是的,您可以指定用于自动预热的查询.从关于缓存的Solr参考指南,请参阅查询- 相关的侦听器"部分详细介绍了在首次创建或新创建的搜索器以替换Solr中的现有搜索器时如何指定查询.

Yes you can specify the queries to use for the autowarming. From the Solr Reference Guide on Caches, please see the Query-Related Listeners section for details on how the queries can be specified when searchers are either frist created or newly created to replace an existing searcher in Solr.

还请注意以下内容(同样来自《参考指南》):

Also please note that the following (also from the Reference Guide):

当新的搜索者打开时,当前的搜索者会继续处理请求,而新的搜索者会自动预热其缓存.新的搜索者使用当前搜索者的缓存来预先填充自己的缓存.

When a new searcher is opened, the current searcher continues servicing requests while the new one auto-warms its cache. The new searcher uses the current searcher's cache to pre-populate its own.

这篇关于SOLR中的queryResultCache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆