lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tamanjit.bindra@yahoo.co.in" <tamanjit.bin...@yahoo.co.in>
Subject Re: How to implement Spell Checker using Solr?
Date Tue, 27 Sep 2011 05:07:33 GMT
Firstly, just to make it clear the dictionary is made out of already indexed
terms, rather it is built upon it if you are using *<str
name="classname">solr.IndexBasedSpellChecker</str>* which you are.

Next lot of changes are required for your *solrconfig.xml*

1. <str name="field">spell</str> is the name of the field which will be used
to create your dictionary. Does it exist in schema.xml?

2. <str name="queryAnalyzerFieldType">textSpell</str> is the name of
FieldType used for your dictionary building, as in the <str
name="field">spell</str> should be of type textSpell in schema.xml. Is it
so?

Now for you internal error from crawling. This is most probably because your
siolrconfig.xml/schema.xml has been changed. This I assume so because as you
say before trying to implement spellcheck this was working.

/Also, I am not too sure so as to how I can make my search work based on the
search control in my application Like how can I search with the word and
have the suggestion at the same time, since when the search item is say
"form"/"formm", then I should have essentially separate URL created. Does
Solr Spell checker component take care of it on its own. if so how and
exactly how the Solrconfig and Schema xmls should be configured for the
same.


Please note: I would prefer to use a filebased dictionary for the search, so
kindly suggest on those lines.
/

If you are looking for filebased searching, you are going in the wrong
direction. You are trying to use indexbasedspellchecker class when actually
what you need is

<lst name="spellchecker">
<str name="name">file</str>
<str name="classname">solr.FileBasedSpellChecker</str>
<str name="sourceLocation">spellings.txt</str>
<str name="characterEncoding">UTF-8</str>
<str name="spellcheckIndexDir">./spellcheckerFile</str>
</lst>

Kindly read about spellchecker more.




--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-implement-Spell-Checker-using-Solr-tp3268450p3371620.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message