lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Sekiguchi <>
Subject known problem? - firstSearcher event of SpellChecker is never called
Date Sat, 12 Mar 2011 14:50:16 GMT

I'd like to know if it is a known problem before opening a jira issue,
because I've never used SpellChecker so far and it is not in my line.

firstSearcher event 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:

1. initListeners();
2. getSearcher(false,false,null);
   => register (general) firstSearcher listener if it exists
3. call SolrCoreAware.inform();
   => register SpellChecker's firstSearcher listener

After that, is called to execute the firstSearcher event:

if (currSearcher==null && firstSearcherListeners.size() > 0) {
  future = searcherExecutor.submit(
          new Callable() {
            public Object call() throws Exception {
              try {
                for (SolrEventListener listener : firstSearcherListeners) {
              } catch (Throwable e) {
              return null;

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message