Reputation: 59355
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.
Upvotes: 17
Views: 22328
Reputation: 8670
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
<!--
<queryResultCache class="solr.LRUCache"
size="5000"
initialSize="5000"
autowarmCount="2000"/>
-->
Upvotes: 0
Reputation: 4279
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.
Upvotes: 7
Reputation: 3450
Disable all the caches from solrconfig.xml
.
Note that the Lucene FieldCache will still be enabled.
Upvotes: 3