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 magoelem <ma...@avusa.co.za> on 2011/07/21 16:31:54 UTC
Solr Spell checker PROBLEMS
Hi,
I am using Wordnet dictionary for spelling suggestions.
i do not get any suggestion,can anyone help,
My schema is configured as:schema.xml
////////////////////////////////////////////////////////////////////////////////////////////////////////
<fieldType name="textSpell" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1"
catenateAll="0" splitOnCaseChange="1" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.SnowballPorterFilterFactory" language="English"
protected="protwords.txt" />
<filter class="solr.DictionaryCompoundWordTokenFilterFactory"
dictionary="dictionary.txt" />
<filter class="solr.SnowballPorterFilterFactory" language="German"
protected="protwords.txt" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnCaseChange="1" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.SnowballPorterFilterFactory" language="English"
protected="protwords.txt" />
<filter class="solr.SnowballPorterFilterFactory" language="German"
protected="protwords.txt" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
</analyzer>
</fieldType>
<field name="spell" type="textSpell" indexed="true" stored="true"
multiValued="true" />
////////////////////////////////////////////////////////////////////////////////////////////////////////
My spell check component is configured as:sorlconfig.xml
////////////////////////////////////////////////////////////////////////////////////////////////////////
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
- <lst name="spellchecker">
<str name="classname">solr.FileBasedSpellChecker</str>
<str name="name">file</str>
<str name="sourceLocation">dictionary.txt</str>
<str name="characterEncoding">UTF-8</str>
<str name="spellcheckIndexDir">./spellcheckerFile</str>
</lst>
</searchComponent>
<requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<bool name="terms">true</bool>
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">default</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.count">2</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
/////////////////////////////////////////////////////////////////////////
With the above configuration, I do not get any spelling suggestions.
Can anyoneplease help.
here is my out results when i heat this:
http://localhost:8080/solr/spell/?q=hell
ultrashar&spellcheck=true&spellcheck.collate=true&spellcheck.build=true
<lst name="spellcheck">
<lst name="suggestions">
<bool name="correctlySpelled">false</bool>
</lst>
</lst>
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Spell-checker-PROBLEMS-tp3188639p3188639.html
Sent from the Solr - User mailing list archive at Nabble.com.