Hello, Yes we used firstSearcher in solr7. I should have mentionned that we tried firstSearcher and newSearcher in solr 9, we tried all possibilities we could think of in solrconfig.xml
Thanks for your answer. We'll stick to our solution, ie load values in constructor. Best regards, Elisabeth Le sam. 27 avr. 2024 à 04:01, Chris Hostetter <hossman_luc...@fucit.org> a écrit : > > : <query> <listener event="newSearcher" > : class="com.mappy.lbs.solr.search.function.StopWordSubtypeLoader" /> > : </query> > > ... > > : In solr 7.3.1, function newSearcher was called at startup and we > : loaded values stopwords and startswith in newSearcher, but it doesn't > : work in solr 9.2.1, the function newSearcher is not called at startup > > > Are you sure you're not confusing the "newSearcher" *EVENT* with the > newSearcher() method name? > > Regardless of Solr version, <listener>'s configured to response to > `event="newSearcher"` have never been called on startup -- but listeners > configured with `event="firstSearcher"` are (techinically not on startup, > but when the first SolrIndexSearcher is available for the core) > > In both cases (`event="newSearcher"` & `event="firstSearcher"`) the > *METHOD* that ges called on the regestered SolrEventListener is the > `newSearcher()` method -- the difference is in the `event="firstSearcher"` > situation the `currentSearcher` argument to the method is null. > > Are you certain you didn't have your plugin configured using > `event="firstSearcher"` in your 7.3 config? > > The only other possibility i can think of is that some other plugin you > were using (or bug in Solr) was causing Solr to open a "firstSearcher", > and then immediately re-open a "newSearcher" before your code stack neeed > your StopWordSubtypeLoader to be available. > > > > -Hoss > http://www.lucidworks.com/ >