如何清除Solr中的缓存?
我正在尝试比较不同 Solr 查询的性能。为了得到公平的测试,我想清除查询之间的缓存。
这是怎么做到的?当然,可以重新启动服务器,我很好奇是否有更快的方法。
I'm trying to compare the performance of different Solr queries. In order to get a fair test, I want to clear the cache between queries.
How is this done? Of course, one can restart the server, I was curious if there is a quicker way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用的是 4.2.1 版本,即使使用
autowarmCount="0"
,执行数据导入后缓存也不会更新。在这种情况下,在 Solr Admin(通常是
http://localhost:8983/
)上转到 Core Admin 并单击重新加载。
刷新后,您应该在“当前”字段上看到一个绿色的复选标记。
I'm using version 4.2.1 and even with
autowarmCount="0"
the cache is not updated after doing a Dataimport.In that case, on Solr Admin (usually
http://localhost:8983/
)Go to Core Admin and click Reload.
When refreshed, you should see a green check mark on the "current" field.
禁用 solrconfig.xml 中的所有缓存。
请注意,Lucene FieldCache 仍将启用。
Disable all the caches from
solrconfig.xml
.Note that the Lucene FieldCache will still be enabled.
只是为了了解详细信息
如果您想禁用缓存(或全部),请注释掉 solrconfig.xml 中的这些部分并重新启动 solr。
禁用 queryResultCache 示例
Just for thorough details
If you want to disable a cache (or all), comment out those sections in solrconfig.xml and restart solr.
example diable queryResultCache