lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aruninfo100 <arunabraham...@gmail.com>
Subject SolrSpellChecker not showing suggestions when the first character of a word is wrong
Date Thu, 11 May 2017 01:04:53 GMT
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.

Mime
View raw message