Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 64669 invoked from network); 14 Mar 2011 01:45:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Mar 2011 01:45:54 -0000 Received: (qmail 71496 invoked by uid 500); 14 Mar 2011 01:45:53 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 71443 invoked by uid 500); 14 Mar 2011 01:45:53 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 71436 invoked by uid 99); 14 Mar 2011 01:45:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 01:45:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2011 01:45:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B4C8C39C5EA for ; Mon, 14 Mar 2011 01:45:29 +0000 (UTC) Date: Mon, 14 Mar 2011 01:45:29 +0000 (UTC) From: "Koji Sekiguchi (JIRA)" To: dev@lucene.apache.org Message-ID: <362011198.45.1300067129736.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1006298289.43.1300067009548.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (SOLR-2425) firstSearcher Listener of SpellChecker can be never called MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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 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 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 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 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org