[
https://issues.apache.org/jira/browse/SOLR-622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618822#action_12618822
]
Yonik Seeley commented on SOLR-622:
-----------------------------------
bq. Yes, the searcher is being created after informing the listeners. IMO, that
seems a bit counter-intuitive. The commit has happened so I would expect to see
the new data.
That particular callback was made for index distribution. It needed to be
synchronous with the commit process, not allowing anything else to proceed
until finished to ensure a clean snapshot. The trigger is closing of the
IndexWriter, not opening of a new IndexSearcher.
We could create new callbacks, but I'm not sure I would want to do that for 1.3
bq. So the way used in the latest patch using a newSearcher event should be
fine, right? It is done in a separate thread through ExecutorService in
SolrCore.
I haven't looked at the patch, but this sounds potentially dangerous if you are
using the searcher passed to you (async closes, etc). I've added a comment to
the code about this.
> SpellCheckComponent should build or load indices on startup and commits
> -----------------------------------------------------------------------
>
> Key: SOLR-622
> URL: https://issues.apache.org/jira/browse/SOLR-622
> Project: Solr
> Issue Type: Improvement
> Components: spellchecker
> Affects Versions: 1.3
> Reporter: Shalin Shekhar Mangar
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Fix For: 1.3
>
> Attachments: SOLR-622.patch, SOLR-622.patch
>
>
> SpellCheckComponent must be able to build/load spell check index on startup
> and commits. With SOLR-605, SpellCheckComponent can register an event
> listener for firstSearcher and newSearcher events and rebuild/reload indices
> as appropriate.
> * If index uses a FSDirectory and exists on disk then just reload it or else
> build it on firstSearcher event.
> * If index is built from a Solr field then re-build it on newSearcher event.
> This will help avoid having to add QuerySenderListener in configuration and
> will not force people to issue build on first query.
> All this should be configurable so that people who don't want to rebuild on
> commits should be able to turn this feature off per configured spell checker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.