You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Prasi S <pr...@gmail.com> on 2013/11/27 09:22:11 UTC

Persist solr cache

Hi all,
Is there any way the solr caches ( document / field/ query) cache can be
persisted on disk. In case of system crash, can i make the new cache loaded
from the persisted cache.

Thanks,
Prasi

Re: Persist solr cache

Posted by "michael.boom" <my...@yahoo.com>.
You could just add the queries you have set up in your batch script to the
firstSearcher queries. Like this, you wouldn't need to run the script
everytime you restart Solr.

As for crash protection and immediate action, that's outside the scope of
the Solr mailing list. You could setup a watchdog that will restart Solr if
it crashes, or something like that. 

Or you could use SolrCloud with replicas on multiple machine. This would
remove the SPOF from your system.



-----
Thanks,
Michael
--
View this message in context: http://lucene.472066.n3.nabble.com/Persist-solr-cache-tp4103463p4103487.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Persist solr cache

Posted by Prasi S <pr...@gmail.com>.
Currently , once solr is started, we run a batch that would fire queries to
solr ( just something like the firstsearcher does). Once this is done, then
the users would start using search.

In case the server is restarted or anything crashes, then again i have to
run this batch which i cannot control. Thats why if there is any way we can
persist .

This was only for our business scenario.



Thanks,
Prasi


On Wed, Nov 27, 2013 at 2:05 PM, michael.boom <my...@yahoo.com> wrote:

> Caches are only valid as long as the Index Searcher is valid. So, if you
> make
> a commit with opening a new searcher then caches will be invalidated.
> However, in this scenario you can configure your caches so that the new
> searcher will keep a certain number of cache entries from the previous one
> (autowarmCount).
> That's the only cache "persistence" Solr can offer. On restarting/crash you
> can't reuse caches.
>
> Why do you need to persist caches in case of a crash? What's your usage
> scenario?
> Do you have problems with performance after startup?
>
> You can read more at http://wiki.apache.org/solr/SolrCaching#Overview
>
>
>
> -----
> Thanks,
> Michael
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Persist-solr-cache-tp4103463p4103469.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Persist solr cache

Posted by "michael.boom" <my...@yahoo.com>.
Caches are only valid as long as the Index Searcher is valid. So, if you make
a commit with opening a new searcher then caches will be invalidated.
However, in this scenario you can configure your caches so that the new
searcher will keep a certain number of cache entries from the previous one
(autowarmCount). 
That's the only cache "persistence" Solr can offer. On restarting/crash you
can't reuse caches.

Why do you need to persist caches in case of a crash? What's your usage
scenario?
Do you have problems with performance after startup?

You can read more at http://wiki.apache.org/solr/SolrCaching#Overview



-----
Thanks,
Michael
--
View this message in context: http://lucene.472066.n3.nabble.com/Persist-solr-cache-tp4103463p4103469.html
Sent from the Solr - User mailing list archive at Nabble.com.