lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aruninfo100 <arunabraham...@gmail.com>
Subject Re: SolrSpellChecker not showing suggestions when the first character of a word is wrong
Date Thu, 11 May 2017 17:26:17 GMT
 It worked.Adding  <int name="minPrefix">0</int> to search handler did the
trick.Thanks.

On May 11, 2017 3:13 PM, "Atita Arora [via Lucene]" <
ml+s472066n4334587h1@n3.nabble.com> wrote:

Hi Arun,

Try adding
<!-- the minimum shared prefix when enumerating terms -->
      <int name="minPrefix">0</int>

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

configuration.

It should work !

Thanks,
Atita

On Thu, May 11, 2017 at 6:34 AM, aruninfo100 <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=4334587&i=0>>
wrote:

> Hi All,
>
> I am trying to do spell check with Solr.I am able to get suggestions when
> the word is incorrectly spelled.
> Eg:-word entered(incorrectly) :*maintaan*
> I am getting *"maintain" *as suggestion,but if I provide *naintain*,it
> doesnt provide suggestions.
>
> *solrConfig:*
>
>  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
> <str name="queryAnalyzerFieldType">text_general</str>
> <lst name="spellchecker">
> <str name="name">default</str>
> <str name="field">spell_text</str>
> <str name="classname">solr.DirectSolrSpellChecker</str>
> <str name="distanceMeasure">internal</str>
> <float name="accuracy">0.5</float>
> </lst>
> <lst name="spellchecker">
> <str name="name">wordbreak</str>
> <str name="classname">solr.WordBreakSolrSpellChecker</str>
> <str name="field">spell_text</str>
> <str name="combineWords">true</str>
> <str name="breakWords">true</str>
> <int name="maxChanges">5</int>
>     <int name="minBreakLength">5</int>
> </lst>
>
>
> <requestHandler name="/spell"
> class="org.apache.solr.handler.component.SearchHandler">
>   <lst name="defaults">
>         <str name="spellcheck.dictionary">default</str>
>     <str name="spellcheck.dictionary">wordbreak</str>
>     <str name="spellcheck">true</str>
>         <str name="spellcheck.extendedResults">true</str>
>         <str name="spellcheck.count">5</str>
>         <str name="spellcheck.alternativeTermCount">2</str>
>         <str name="spellcheck.maxResultsForSuggest">5</str>
>         <str name="spellcheck.collate">true</str>
>         <str name="spellcheck.collateExtendedResults">true</str>
>         <str name="spellcheck.maxCollationTries">5</str>
>         <str name="spellcheck.maxCollations">3</str>
>          <str name="spellcheck">true</str>
>      <str name="spellcheck.build">true</str>
>   </lst>
>   <arr name="last-components">
>     <str>spellcheck</str>
>   </arr>
> </requestHandler>
>
> Kindly hep me on this.
>
> Thanks and Regards,
> Arun
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/SolrSpellChecker-not-showing-suggestions-when-
> the-first-character-of-a-word-is-wrong-tp4334554.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


------------------------------
If you reply to this email, your message will be added to the discussion
below:
http://lucene.472066.n3.nabble.com/SolrSpellChecker-
returning-suggestions-for-words-present-in-index-tp4334554p4334587.html
To unsubscribe from SolrSpellChecker returning suggestions for words
present in index, click here
<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4334554&code=YXJ1bmFicmFoYW0xMDBAZ21haWwuY29tfDQzMzQ1NTR8MTY3MDg1MTM0OA==>
.
NAML
<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://lucene.472066.n3.nabble.com/SolrSpellChecker-returning-suggestions-for-words-present-in-index-tp4334554p4334687.html
Sent from the Solr - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message