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 Niran Fajemisin <af...@yahoo.com> on 2013/04/23 00:16:42 UTC

Soft Commit and Document Cache

Hi all,

A quick (and hopefully simply) question: Does the document cache (or any of the other caches for that matter), get invalidated after a soft commit has been performed?

Thanks,
Niran

Re: Soft Commit and Document Cache

Posted by Niran Fajemisin <af...@yahoo.com>.
Thanks Shawn and Mark! That was very helpful.

-Niran



>________________________________
> From: Shawn Heisey <so...@elyograg.org>
>To: solr-user@lucene.apache.org 
>Sent: Monday, April 22, 2013 5:30 PM
>Subject: Re: Soft Commit and Document Cache
> 
>
>On 4/22/2013 4:16 PM, Niran Fajemisin wrote:
>> A quick (and hopefully simply) question: Does the document cache (or any of the other caches for that matter), get invalidated after a soft commit has been performed?
>
>All Solr caches are invalidated when you issue a commit with 
>openSearcher set to true.  There would be no reason to do a soft commit 
>with openSearcher set to false.  That setting only makes sense with hard 
>commits.
>
>If you have queries defined for the newSearcher event, then they will be 
>run, which can pre-populate caches.
>
>The filterCache and queryResultCache can be autowarmed on commit - the 
>most relevant autowarmCount queries in the cache from the old searcher 
>are re-run against the new searcher.  The queryResultWindowSize 
>parameter helps control exactly what gets cached with the queryResultCache.
>
>The documentCache cannot be autowarmed, although I *think* that when 
>entries from the queryResultCache are run, it will also populate the 
>documentCache, though I could be wrong about that.
>
>I do not know whether autowarming is done before or after newSearcher 
>queries.
>
>http://wiki.apache.org/solr/SolrCaching
>
>Thanks,
>Shawn
>
>
>
>

Re: Soft Commit and Document Cache

Posted by Shawn Heisey <so...@elyograg.org>.
On 4/22/2013 4:16 PM, Niran Fajemisin wrote:
> A quick (and hopefully simply) question: Does the document cache (or any of the other caches for that matter), get invalidated after a soft commit has been performed?

All Solr caches are invalidated when you issue a commit with 
openSearcher set to true.  There would be no reason to do a soft commit 
with openSearcher set to false.  That setting only makes sense with hard 
commits.

If you have queries defined for the newSearcher event, then they will be 
run, which can pre-populate caches.

The filterCache and queryResultCache can be autowarmed on commit - the 
most relevant autowarmCount queries in the cache from the old searcher 
are re-run against the new searcher.  The queryResultWindowSize 
parameter helps control exactly what gets cached with the queryResultCache.

The documentCache cannot be autowarmed, although I *think* that when 
entries from the queryResultCache are run, it will also populate the 
documentCache, though I could be wrong about that.

I do not know whether autowarming is done before or after newSearcher 
queries.

http://wiki.apache.org/solr/SolrCaching

Thanks,
Shawn


Re: Soft Commit and Document Cache

Posted by Mark Miller <ma...@gmail.com>.
Yup - all of the top level caches are. It's a trade off - don't NRT more than you need to.

- Mark

On Apr 22, 2013, at 6:16 PM, Niran Fajemisin <af...@yahoo.com> wrote:

> Hi all,
> 
> A quick (and hopefully simply) question: Does the document cache (or any of the other caches for that matter), get invalidated after a soft commit has been performed?
> 
> Thanks,
> Niran