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 arian487 <ak...@tagged.com> on 2011/07/01 19:47:28 UTC

QueryResultCache question

So it seems the things in the queryResultCache have no TTL, I'm just curious
how it works if I reindex something with new info?  I am going to be
reindexing things often (I'd sort by last login and this changes fast). 
I've been stepping through the code and of course if the same queries come
in it simply gets the results from the key in the result cache.  However, if
I make the same query over and over again, when will I ever get different
results?  

I'm a little confused as to how the 'correct' results are shown if it just
uses the QueryResultKey to get the results from the cache.  I imagine a new
Searcher with a fresh cache is created or something with every index?  If
I'm reindexing very often, how useful is the QueryResultCache?  

--
View this message in context: http://lucene.472066.n3.nabble.com/QueryResultCache-question-tp3130135p3130135.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: QueryResultCache question

Posted by arian487 <ak...@tagged.com>.
Thanks for the quick reply!  I see theres no way to access the result cache,
I actually want to access the result the cache in a new component I have
which runs after the query but it seems this is impossible.  I guess I'm
just going to rebuild the code to make it public or something as I need the
result cache.  

--
View this message in context: http://lucene.472066.n3.nabble.com/QueryResultCache-question-tp3130135p3130603.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: QueryResultCache question

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
Hi, currently in Solr, updated Documents doesn't actually change until you
issue a "commit" operation (the same happen with new and deleted documents).
After the commit operation, all caches are flushed. That's why there is no
TTL, all documents in Cache remain up to date with the index until a commit
is issued.

On Fri, Jul 1, 2011 at 2:47 PM, arian487 <ak...@tagged.com> wrote:

> So it seems the things in the queryResultCache have no TTL, I'm just
> curious
> how it works if I reindex something with new info?  I am going to be
> reindexing things often (I'd sort by last login and this changes fast).
> I've been stepping through the code and of course if the same queries come
> in it simply gets the results from the key in the result cache.  However,
> if
> I make the same query over and over again, when will I ever get different
> results?
>
> I'm a little confused as to how the 'correct' results are shown if it just
> uses the QueryResultKey to get the results from the cache.  I imagine a new
> Searcher with a fresh cache is created or something with every index?  If
> I'm reindexing very often, how useful is the QueryResultCache?
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/QueryResultCache-question-tp3130135p3130135.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>