: 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.
I haven't really thought about it before, but it seems logical that SolrCore.getSearcher() should work during the "inform" stage .. there may be some chicken and egg problems there though -- I'm guessing if it doesn't work right now it might be related to the issues with needing to inform all plugins before triggering the "firstSearcher" events (since handlers are likely used by those events) -- but it seems like the search could be created, then "inform" the plugins, then trigger the firstSearcher events. : 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). As I mentioned in some spelling related issue recently (although aparently not SOLR-572) the straightforward way to do this is to initialize things like this when requests with a very specific initialization params occur, and then document that the "recommended" way to use your handler is to configure a request with those params as part of the firstSearcher event. (having initilization work done like this is also neccessary to allow rebuilding a spelling index after the dictionary has changed) -Hoss