lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyer, James" <>
Subject RE: Volatile spellcheck index
Date Wed, 05 Feb 2014 13:58:21 GMT

Assuming you're using Solr 3.x, under:

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
 <lst name="spellchecker">
</searchComponent> can add:

<str name="spellcheckIndexDir">./spellchecker</str>

...then the spell check index will be created on-disk and not in memory.

But in Solr 4.0, the default spellcheck implementation changed to org.apache.solr.spelling.DirectSolrSpellChecker,
which does not create a separate index for for spellchecking, "build" does nothing, and you
need not worry at all about these things.  The wiki still says "experimental" here but that
is woefully out-of-date.

James Dyer
Ingram Content Group
(615) 213-4311

-----Original Message-----
From: Alejandro Marqués Rodríguez [] 
Sent: Wednesday, February 05, 2014 3:41 AM
Subject: Volatile spellcheck index


I'm having a problem with the spell check index building. I've configured
the spell checker component to have the index built on optimize.

*  <!-- Spell Check
<> -->*
*  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">*
*  <str name="queryAnalyzerFieldType">spell</str>*

*  <lst name="spellchecker">*
*      <str name="name">spellchecker</str>*
*      <str name="field">spell</str>*
*      <str name="accuracy">0.7</str>*
*      <str name="buildOnOptimize">true</str>*
*  </lst>*
*  </searchComponent>*

*  <!-- A request handler for demonstrating the spellcheck component.
<> for details -->*
*  <requestHandler name="/spell" class="solr.SearchHandler">*
*    <lst name="defaults">      *
*      <str name="spellcheck.dictionary">spellchecker</str>*
*      <str name="spellcheck">on</str>*
*      <str name="spellcheck.onlyMorePopular">false</str>*
*      <str name="spellcheck.extendedResults">false</str>*
*      <str name="spellcheck.count">1</str>*
*    </lst>*
*    <arr name="last-components">*
*      <str>spellcheck</str>*
*    </arr>*
*  </requestHandler>*

After the index process I launch an optimize request and the spellcheck
index is generated and everything is working fine. However, if I restart
Solr the spell check is not working anymore until I execute another
optimize request.

So, is this the expected way of working? Is the spell check index deleted
after every server restart? Is there any way to make it persistent?

And just one more question, I remember in previous Solr versions the
spellcheck had even its own folder under the data folder, so, for example I
could see if the spell check index had been generated just listing the
files under that folder. Does that folder still exist? Is there any way of
knowing if the spell check index has been generated without executing a
query that is supposed to return a correction?

Thanks in advance

Alejandro Marqués Rodríguez

Paradigma Tecnológico
Avenida de Europa, 26. Ática 5. 3ª Planta
28224 Pozuelo de Alarcón
Tel.: 91 352 59 42

View raw message