Thanks Chris. I have implemented SolrCoreAware interface and loading the required file in the inform method.
Thanks, Ramana. On Wed, Sep 10, 2014 at 10:59 PM, Chris Hostetter <hossman_luc...@fucit.org> wrote: > > : But, To make it better, I would like to load this file only once and in > the > : init() method of handler class. I am not sure how to get the access of > : SolrCore in the init method. > > you can't access the SolrCore during hte init() method, because at the > time it's called the SolrCore itself is not yet fully initialized. > > what you can do is implement the SolrCoreAware interface, and then > you will be garunteed that *after* your init method is called, and before > you are ever asked to handle any requests, your inform(SolrCore) method > will be called... > > > -Hoss > http://www.lucidworks.com/ >