: I'm interested in improving my existing custom cache warming by being
: selective about what updates rather than rebuilding completely.
:
: How can I tell what documents were updated/added/deleted from the old
: cache to the new IndexSearcher?

cache warming in Solr is based mainly arround the idea of "what keys were
in the old cache?" then "what's changed?" ... because regardless of what
updates may have happened, wholesale docids shifts might have taken place.

Of course, if you are dealing with a custom cache where the values aren't
DocSetws or DocLists but your own custom objects that don't know about
indiviual docIds, this doesn't really affect you as much.

I'm not entirely sure i understand your situation, but one trick yonik
found that really improved the cache warming in a custom CacheRegenerator
i had was in dealing with big metadata documents that i was parsing into
objects for use in a custom request handler.  He pointed out that if i
put the Lucene Document in my CacheValue objects, then when
warming my newCache, i could do a search on the newSearcher, get the
Document back, and if it was the same as the Document in the value from my
oldCache i could copy it wholesale instead of redoing all of the parsing
(this was complicated by Document not supporting equals, but you get the
idea)


I suppose to try and make CacheRegenerator's lives easier, we could expose
the SolrIndexSearcher use with the oldCache -- but i'm still not sure how
usefull that would be ... "diffing" two IndexSearchers isn't very easy,
but i suppose in some cases comparing hte TermEnums for some fields
(like the uniqueKey field for example) might be helpful.


-Hoss

Reply via email to