¿Cómo borrar el caché en 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.

preguntado el 01 de febrero de 12 a las 14:02

To get an even fairer test (depending on what you are actually measuring), you could could also clear the OS buffer cache before every test (see linux-mm.org/Drop_Caches). -

@jpountz thanks for the link. I tested it with echo 3 > /proc/sys/vm/drop_caches but it does not clear the Solr caches. -

Right, it only clears the OS cache. To clear solr caches, I think having autowarmCount=0 and running a commit would work wiki.apache.org/solr/SolrCaching#autowarmCount '-

3 Respuestas

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/)

Utilice la herramienta Core Admin y haga clic Recargar. When refreshed, you should see a green check mark on the "current" field.

contestado el 15 de mayo de 13 a las 18:05

Disable all the caches from solrconfig.xml.

Note that the Lucene FieldCache will still be enabled.

Respondido 01 Feb 12, 19:02

The question is about clearing cache, not disabling it. - Pinkesh Sharma

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"


Respondido 23 Oct 19, 13:10

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.