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 Marcin Rzewucki <mr...@gmail.com> on 2012/11/22 17:57:48 UTC
Spellchecker and missing suggestions
Hi,
I'm using solr4. I have the following settings in solrconfig.xml:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<str name="name">default</str>
<str name="field">titl_spell</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">titl_spell</str>
<str name="combineWords">true</str>
<str name="breakWords">true</str>
<int name="maxChanges">10</int>
</lst>
</searchComponent>
<requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<str name="spellcheck.dictionary">default</str>
<str name="spellcheck.dictionary">wordbreak</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>
and in schema.xml:
<fieldType name="textSpell" class="solr.TextField"
positionIncrementGap="100" omitNorms="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StandardFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StandardFilterFactory"/>
</analyzer>
</fieldType>
I reloaded solr configuration, reloaded documents, did
spellcheck.build=true, but it does not return suggestions for me:
http://
<host>/solr/mycore/spell?q=titl_spell:teleision&spellcheck.q=teleision&spellcheck.extendedResults=true&spellcheck.collate=true&debugQuery=true
<result name="response" numFound="0" start="0" maxScore="0.0"/>
<lst name="spellcheck">
<lst name="suggestions">
<bool name="correctlySpelled">false</bool>
</lst>
</lst>
<lst name="debug">
<str name="rawquerystring">titl_spell:teleision</str>
<str name="querystring">titl_spell:teleision</str>
<str name="parsedquery">titl_spell:teleision</str>
<str name="parsedquery_toString">titl_spell:teleision</str>
<str name="QParser">LuceneQParser</str>
<lst name="explain"/>
</lst>
"correctlySpelled"=true but no suggestions. What is missing in
configuration or what am I doing wrong ?
Thanks in advance.
Regards.
Re: Spellchecker and missing suggestions
Posted by iwo <iw...@gmail.com>.
I have same problem: no suggestions
and really similar configration
-----
Complicare è facile, semplificare é difficile.
Complicated is easy, simple is hard.
quote: http://it.wikipedia.org/wiki/Bruno_Munari
--
View this message in context: http://lucene.472066.n3.nabble.com/Spellchecker-and-missing-suggestions-tp4021881p4025126.html
Sent from the Solr - User mailing list archive at Nabble.com.