You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Romi <ro...@gmail.com> on 2011/06/20 08:35:11 UTC

Request handle solrconfig.xml Spellchecker

I am trying to set up spellchecker, according to solr documentation. But when
I am testing, I don't have any suggestion. My piece of code follows: 

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">

    <str name="queryAnalyzerFieldType">textSpell</str>

    <lst name="spellchecker">
      <str name="classname">solr.IndexBasedSpellChecker</str>
      <str name="name">default</str>
      <str name="field">name</str>
      <str name="spellcheckIndexDir">./spellchecker</str>
    </lst>
    
</searchComponent>


<requestHandler name="/spellcheck" class="solr.SearchHandler">
    <lst name="defaults">
      <str name="echoParams">explicit</str>
      
      <str name="spellcheck.dictionary">default</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>







i build the dictionary as
http://localhost:8983/solr/select/?q=*:*&spellcheck=true&spellcheck.build=true


but when i run the query i am not getting any suggestion
http://localhost:8983/solr/select?q=komputer&spellcheck=true

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/Request-handle-solrconfig-xml-Spellchecker-tp3085053p3085053.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Request handle solrconfig.xml Spellchecker

Posted by Jan Høydahl <ja...@hoydahl.com>.
Try

http://localhost:8983/solr/spellcheck?q=komputer&spellcheck=true

If you want the spellchecker to be enabled in your default search handler, you need to include this in your default search-hanlder config:
   <arr name="last-components">
     <str>spellcheck</str>
   </arr>

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 20. juni 2011, at 08.35, Romi wrote:

> I am trying to set up spellchecker, according to solr documentation. But when
> I am testing, I don't have any suggestion. My piece of code follows: 
> 
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
> 
>    <str name="queryAnalyzerFieldType">textSpell</str>
> 
>    <lst name="spellchecker">
>      <str name="classname">solr.IndexBasedSpellChecker</str>
>      <str name="name">default</str>
>      <str name="field">name</str>
>      <str name="spellcheckIndexDir">./spellchecker</str>
>    </lst>
> 
> </searchComponent>
> 
> 
> <requestHandler name="/spellcheck" class="solr.SearchHandler">
>    <lst name="defaults">
>      <str name="echoParams">explicit</str>
> 
>      <str name="spellcheck.dictionary">default</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>
> 
> 
> 
> 
> 
> 
> 
> i build the dictionary as
> http://localhost:8983/solr/select/?q=*:*&spellcheck=true&spellcheck.build=true
> 
> 
> but when i run the query i am not getting any suggestion
> http://localhost:8983/solr/select?q=komputer&spellcheck=true
> 
> -----
> Thanks & Regards
> Romi
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Request-handle-solrconfig-xml-Spellchecker-tp3085053p3085053.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Request handle solrconfig.xml Spellchecker

Posted by Erick Erickson <er...@gmail.com>.
Look in your solr/data/spellcheck directory. Is there anything in
there? It should
look like a regular Solr index, you should even be able to invoke Luke on it.

If there's nothing there, then something's wrong with your build
process, probably
your configuration in solrconfig.xml.... Have you made any changes
there? (doesn't
look like it).

Have you indexed data before executing the build? this is an index-based
spell checker, so if there aren't any documents in your index you won't see
any suggestions.

Best
Erick

On Mon, Jun 20, 2011 at 2:35 AM, Romi <ro...@gmail.com> wrote:
> I am trying to set up spellchecker, according to solr documentation. But when
> I am testing, I don't have any suggestion. My piece of code follows:
>
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>
>    <str name="queryAnalyzerFieldType">textSpell</str>
>
>    <lst name="spellchecker">
>      <str name="classname">solr.IndexBasedSpellChecker</str>
>      <str name="name">default</str>
>      <str name="field">name</str>
>      <str name="spellcheckIndexDir">./spellchecker</str>
>    </lst>
>
> </searchComponent>
>
>
> <requestHandler name="/spellcheck" class="solr.SearchHandler">
>    <lst name="defaults">
>      <str name="echoParams">explicit</str>
>
>      <str name="spellcheck.dictionary">default</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>
>
>
>
>
>
>
>
> i build the dictionary as
> http://localhost:8983/solr/select/?q=*:*&spellcheck=true&spellcheck.build=true
>
>
> but when i run the query i am not getting any suggestion
> http://localhost:8983/solr/select?q=komputer&spellcheck=true
>
> -----
> Thanks & Regards
> Romi
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Request-handle-solrconfig-xml-Spellchecker-tp3085053p3085053.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>