Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear the cache in 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.

like image 502
Eric Wilson Avatar asked Feb 01 '12 14:02

Eric Wilson


People also ask

How to clear cache in Solr?

Go to Core Admin and click Reload. When refreshed, you should see a green check mark on the "current" field. Show activity on this post. Disable all the caches from solrconfig.

Does SOLR cache results?

The most typical way Solr uses the filterCache is to cache results of each fq search parameter, though there are some other cases as well. Subsequent queries using the same parameter filter query result in cache hits and rapid returns of results.

How does SOLR cache work?

Solr caches are associated with a specific instance of an Index Searcher, a specific view of an index that doesn't change during the lifetime of that searcher. As long as that Index Searcher is being used, any items in its cache will be valid and available for reuse.

What is SOLR server?

Solr is a search server built on top of Apache Lucene, an open source, Java-based, information retrieval library. It is designed to drive powerful document retrieval applications - wherever you need to serve data to users based on their queries, Solr can work for you.


1 Answers

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.

like image 136
bubbassauro Avatar answered Sep 19 '22 16:09

bubbassauro