在solr中禁用查询结果和文档缓存,仅在solr中使用过滤器缓存吗?

问题描述 投票:0回答:1

我尝试将文档和查询结果缓存的大小设置为零,但仍然没有被禁用。我看到这些缓存中有很多驱逐,因为其大小为零。如何完全禁用除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缓存,但仍然找不到关闭文档缓存的方法

solr solrcloud
1个回答
0
投票

要禁用缓存,请启用= false

 <!-- disabled -->
<queryResultCache 
                enabled ="false"
                class="solr.LRUCache"
                  size="0"
                  initialSize="0"
                  autowarmCount="0"/>

通过这样做,它也会从插件/统计信息屏幕中删除

© www.soinside.com 2019 - 2024. All rights reserved.