queryResultCache in SOLR

我的梦境 提交于 2019-12-13 12:35:51

问题


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.

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?


回答1:


The queryResultCache will only store results from successfully handled results.

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.



来源:https://stackoverflow.com/questions/16295320/queryresultcache-in-solr

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!