: In my understanding, the Current Index Searcher uses a cache instance and
: when a New Index Searcher is registered a new cache instance is used which
: is also auto-warmed. However, what happens when the New Index Searcher is a
: view of an index which has been modified? If the entries contained in the
: old cache are copied during auto warming to the new cache wouldn’t that new
: cache contain invalid entries?

a) i'm not sure what you mean by "view of an index which has been 
modified" ... except for the first time an index is created, an Index 
Searcher always contains a view of an index which has been modified -- 
that view that the IndexSearcher represents is entirely consinsitent and 
doesn't change as documents are added/removed - that's why a new Searcher 
needs to be opened.

b) entries are not copied during autowarming.  the *keys* of the entries 
in the old cache are used to warm the new cache -- using the new searcher 
to generate new values.
  
(caveat: if you have a custom cache, you could write a custom cache 
regenerator that did copy the values from the old cache verbatim -- i have 
done that in special cases where the type of object i was caching didn't 
vary based on the IndexSearcher -- or did vary, but in such a way that i 
could use the new Searcher to determine a cheap piece of information and 
based on the result either reuse an old value that was expensive to 
compute, or recompute it using hte new Searcher.  ... but none of the 
default cache regenerators for the stock solr caches work this way)


: 
: 
: 
: Thanks,
: - Savvas
: 

-Hoss

Reply via email to