我尝试将文档和查询结果缓存的大小设置为零,但仍然没有被禁用。我看到这些缓存中有很多逐出,因为其大小为零。 如何完全禁用除solr中的筛选器缓存之外的所有其他缓存。
这是我的Solr配置代码段。
-->
<!-- disabled -->
<queryResultCache class="solr.LRUCache"
size="0"
initialSize="0"
autowarmCount="0"/>
<!-- Document Cache
Caches Lucene Document objects (the stored fields for each
document). Since Lucene internal document ids are transient,
this cache will not be autowarmed.
-->
<!-- disabled -->
<documentCache class="solr.LRUCache"
size="0"
initialSize="0"
autowarmCount="0"/>
编辑1
注释,或将enable = false设置为零或将大小设置为零在solrconfig中不起作用
如果我们在q参数中传递cache = false,那么我可以关闭queryResult缓存,但仍然找不到关闭文档缓存的方法
答案 0 :(得分:0)
要禁用缓存,请启用= false
<!-- disabled -->
<queryResultCache
enabled ="false"
class="solr.LRUCache"
size="0"
initialSize="0"
autowarmCount="0"/>
通过这样做,它也会从插件/统计信息屏幕中删除