Hi,
While working on SOLR-572, I found that if I try to access the
IndexReader using SolrCore.getSearcher().get().getReader() within the
SolrCoreAware.inform method, the initialization process hangs.
Basically, the SolrCore.getSearcher halts at the searcherLock.wait()
call in the snippet below:
// check to see if we can wait for someone else's searcher to be set
if (onDeckSearchers>0 && !forceNew && _searcher==null) {
try {
searcherLock.wait();
} catch (InterruptedException e) {
log.info(SolrException.toStr(e));
}
}
Is this by design? Are SearchComponents not supposed to access the
IndexReader in this way? I needed access to the IndexReader so that I
can create the spell check index during core initialization. For now,
I've moved the index creation to the first query coming into
SpellCheckComponent (note to myself: review thread-safety in the init
code).
--
Regards,
Shalin Shekhar Mangar.