Hello. I am using the spellcheck component
(https://issues.apache.org/jira/browse/SOLR-572). Since the spell checker
index is kept in RAM, it gets erased every time the Solr server gets
restarted. I was thinking of using either the firstSearcher or the
newSearcher to reload the index every time Solr starts. The events are
defined as so: 

<listener event="newSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<lst>
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">external</str>
<str name="spellcheck.build">true</str>
<str name="q">piza</str>
</lst>
</arr>
</listener>

<listener event="firstSearcher" class="solr.QuerySenderListener">
−
<arr name="queries">
−
<lst>
<str name="q">fast_warm</str>
<str name="start">0</str>
<str name="rows">10</str>
</lst>

<lst>
<str name="q">
static firstSearcher warming query from solrconfig.xml
</str>
</lst>
<lst>
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">external</str>
<str name="spellcheck.build">true</str>
<str name="q">piza</str>
</lst>
</arr>
</listener>

However the index does not load. When I check the logs I noticed the
following:
when the event runs the log looks like this:

INFO: [] webapp=null path=null
params={spellcheck=true&q=piza&spellcheck.dictionary=external&spellcheck.build=true}
hits=0 status=0 QTime=1

a regular request looks like this:

INFO: [] webapp=/solr path=/select/
params={spellcheck=true&q=piza&spellcheck.dictionary=external&spellcheck.build=true}
hits=0 status=0 QTime=19459

I am guessing that the reason it doesn't work with the autowarm is that the
webapp is null. Does anyone have any ideas what I can do to load that index
in advance?
-- 
View this message in context: 
http://www.nabble.com/firstSearcher-and-newSearcher-events-tp19564163p19564163.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to