Need help in configuring Spell check in Apache Solr 8.4

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help in configuring Spell check in Apache Solr 8.4

seeteshh
Hello all,

I am not able to check and test the spell check feature in Apache solr 8.4

Tried multiple examples including

https://examples.javacodegeeks.com/enterprise-java/apache-solr/solr-spellcheck-example/

However I am not getting any results

Regards,

Seetesh Hindlekar



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Seetesh Hindlekar
Reply | Threaded
Open this post in threaded view
|

Re: Need help in configuring Spell check in Apache Solr 8.4

kumar gaurav
Can you share spellcheck component and handler which you have used ?

On Mon, Jan 20, 2020 at 3:35 PM seeteshh <[hidden email]> wrote:

> Hello all,
>
> I am not able to check and test the spell check feature in Apache solr 8.4
>
> Tried multiple examples including
>
>
> https://examples.javacodegeeks.com/enterprise-java/apache-solr/solr-spellcheck-example/
>
> However I am not getting any results
>
> Regards,
>
> Seetesh Hindlekar
>
>
>
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>
Reply | Threaded
Open this post in threaded view
|

Re: Need help in configuring Spell check in Apache Solr 8.4

seeteshh
My searchComponent is as follows

  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
    <str name="queryAnalyzerFieldType">text_general</str>
    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="field">name</str>
      <str name="classname">solr.DirectSolrSpellChecker</str>
      <str name="distanceMeasure">internal</str>
      <float name="accuracy">0.5</float>
      <int name="maxEdits">2</int>
      <int name="minPrefix">1</int>
      <int name="maxInspections">5</int>
      <int name="minQueryLength">4</int>
      <float name="maxQueryFrequency">0.01</float>
    </lst>
   
 
    <lst name="spellchecker">
                <str name="name">wordbreak</str>
                <str name="classname">solr.WordBreakSolrSpellChecker</str>
                <str name="field">name</str>
                <str name="combineWords">true</str>
                <str name="breakWords">true</str>
                <int name="maxChanges">10</int>
    </lst>
       

  </searchComponent>

and my requesthandler is

<requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
    <lst name="defaults">
     
          <str name="df">name</str>  
      <str name="spellcheck.dictionary">default</str>
      <str name="spellcheck">on</str>
      <str name="spellcheck.extendedResults">true</str>
      <str name="spellcheck.count">10</str>
      <str name="spellcheck.alternativeTermCount">5</str>
      <str name="spellcheck.maxResultsForSuggest">5</str>
      <str name="spellcheck.collate">true</str>
      <str name="spellcheck.collateExtendedResults">true</str>
      <str name="spellcheck.maxCollationTries">10</str>
      <str name="spellcheck.maxCollations">5</str>
    </lst>
    <arr name="last-components">
      <str>spellcheck</str>
    </arr>
  </requestHandler>


Regards,

Seetesh Hindlekar



-----
Seetesh Hindlekar
--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Seetesh Hindlekar
Reply | Threaded
Open this post in threaded view
|

Re: Need help in configuring Spell check in Apache Solr 8.4

seeteshh
In reply to this post by kumar gaurav
Hello Kumar Gaurav

For IndexBasedSpellchecker is there a better option of using
org.apache.lucene.search.spell.LevensteinDistance as this is not valid in
Solr 8.4

This line seems to be commented in the Reference Guide

Regards,

Seetesh Hindlekar



-----
Seetesh Hindlekar
--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Seetesh Hindlekar
Reply | Threaded
Open this post in threaded view
|

Re: Need help in configuring Spell check in Apache Solr 8.4

kumar gaurav
HI Seetesh

For IndexBasedSpellchecker default distanceMeasure is LevensteinDistance
itself . Thats why it is commented in the Reference Guide


regards
Kumar Gaurav

On Tue, Jan 28, 2020 at 1:01 PM seeteshh <[hidden email]> wrote:

> Hello Kumar Gaurav
>
> For IndexBasedSpellchecker is there a better option of using
> org.apache.lucene.search.spell.LevensteinDistance as this is not valid in
> Solr 8.4
>
> This line seems to be commented in the Reference Guide
>
> Regards,
>
> Seetesh Hindlekar
>
>
>
> -----
> Seetesh Hindlekar
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>