[
https://issues.apache.org/jira/browse/SOLR-2425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006313#comment-13006313
]
Koji Sekiguchi commented on SOLR-2425:
--------------------------------------
bq. At the time, firstSearcherListeners includes SpellChecker's
firstSearcherListner, registered by procedure 3 above. But if you have no
<listener event="firstSearcher"/> registered in solrconfig.xml, at the
procedure 2, searcherExecutor.submit() is never called because
firstSearcherListeners.size() is zero at the moment.
This was bit misleading.
I think there is a timing issue. Regardless of the existence of <listener
event="firstSearcher"/> in solrconfig.xml, SpellChecker's firstSearcher
listener can never be called, because Callable.call() can be called before
executing
SolrCoreAware.inform().
> firstSearcher Listener of SpellChecker can be never called
> ----------------------------------------------------------
>
> Key: SOLR-2425
> URL: https://issues.apache.org/jira/browse/SOLR-2425
> Project: Solr
> Issue Type: Bug
> Components: spellchecker
> Affects Versions: 1.4.1, 3.1, 4.0
> Reporter: Koji Sekiguchi
> Priority: Minor
>
> mail thread:
> http://www.lucidimagination.com/search/document/65e73468958faf09/known_problem_firstsearcher_event_of_spellchecker_is_never_called
> firstSearcher Listener of SpellChecker is never called when there is no
> <listener event="firstSearcher"/> registered in solrconfig.xml.
> The reason is because the sequence of procedures in SolrCore constructor:
> # initListeners();
> # getSearcher(false,false,null); => register (general) firstSearcher listener
> if it exists
> # call SolrCoreAware.inform(); => register SpellChecker's firstSearcher
> listener
> After that, Callable.call() is called to execute the firstSearcher event:
> {code}
> if (currSearcher==null && firstSearcherListeners.size() > 0) {
> future = searcherExecutor.submit(
> new Callable() {
> public Object call() throws Exception {
> try {
> for (SolrEventListener listener : firstSearcherListeners) {
> listener.newSearcher(newSearcher,null);
> }
> } catch (Throwable e) {
> SolrException.logOnce(log,null,e);
> }
> return null;
> }
> }
> );
> }
> {code}
> At the time, firstSearcherListeners includes SpellChecker's
> firstSearcherListner, registered by procedure 3 above. But if you have no
> <listener event="firstSearcher"/> registered in solrconfig.xml, at the
> procedure 2, searcherExecutor.submit() is never called because
> firstSearcherListeners.size() is zero at the moment.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]