Thanks for the answer James. My fault not specifying the Solr version, we
are working with solr 4.5.

Anyway, thank you very much for pointing the change to
DirectSolrSpellChecker. I hadn't even realized that change, and I think I
wasn't using it, as the line "<str
name="classname">solr.DirectSolrSpellChecker</str>" was missing in my
configuration. Once I changed it, I think everything is working fine even
after server restart.

Thanks again James, you've saved me from some serious headache ;)



2014-02-05 Dyer, James <james.d...@ingramcontent.com>:

> Alejandro,
>
> Assuming you're using Solr 3.x, under:
>
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>  <lst name="spellchecker">
>  ...
>  </lst>
> </searchComponent>
>
> ...you 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 [mailto:
> amarq...@paradigmatecnologico.com]
> Sent: Wednesday, February 05, 2014 3:41 AM
> To: solr-user@lucene.apache.org
> Subject: Volatile spellcheck index
>
> Hi,
>
> 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 http://wiki.apache.org/solr/SpellCheckComponent
> <http://wiki.apache.org/solr/SpellCheckComponent> -->*
> *  <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.
> http://wiki.apache.org/solr/SpellCheckComponent
> <http://wiki.apache.org/solr/SpellCheckComponent> 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
> http://www.paradigmatecnologico.com
> Avenida de Europa, 26. Ática 5. 3ª Planta
> 28224 Pozuelo de Alarcón
> Tel.: 91 352 59 42
>
>


-- 
Alejandro Marqués Rodríguez

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

Reply via email to