I don't do Solr, but had this thought that might be interesting: instead
of associating cache with an IndexSearcher, it could stand by it self.
When new documents are inserted (if I understand it right, Solr have
some kind of notification system for this) the cached queries are placed
on the new documents (indexed in a Memory- or InstantiatedIndex [Lucene
issue 550]) to see if they affect the cached results. If not, cache is
kept. If, cache is rebuilt or removed. With pre-tokenized fields (Lucene
issue 580) it would not consume that much resources at all, but perhaps
that will not fit in the Solr-scheme.

Any immediate comments on that? I'd like to implement something like
this for my self as I notice the CPU working a bit harder than I want it
to every time I update an index.

Reply via email to