[ 
https://issues.apache.org/jira/browse/SOLR-622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-622:
---------------------------------------

    Attachment: SOLR-622.patch

Adds a firstSearcher and postCommit event listener using API calls. The 
firstSearcher listener is added for all spell checkers so that reload is called 
on startup but the postCommit call back is only added if the spellchecker 
specifies the following in it's configuration:
{code:xml}
<str name="buildOnCommit">true</str>
{code}

Adds tests for the same. However, they fail currently. See 
http://www.nabble.com/Question-on-newSearcher-and-commit-callbacks-tp18667573p18667573.html
 for details. If the second commit call in the tests is uncommented then the 
tests pass.

> 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
>
>
> 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.

Reply via email to