On 3/1/2019 4:42 AM, Amjad Khan wrote:
We are trying to extend AbstractSolrEventListener class and override 
newSearcher method. Was curious to know if we can copy the existing searcher 
cache to new searcher instead of executing the query receiving from 
solrconfig.. Because we are not sure what item was mostly searched.

In general, no. Cache entries refer to documents by Lucene ID. When a new searcher is opening, every single Lucene ID in the index might have changed. That is why searches are re-executed -- the information in the existing caches cannot be trusted. There is no way for Solr to determine when an existing Lucene ID has not changed.

Thanks,
Shawn

Reply via email to