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 "Nair, Manas" <Ma...@mtvnmix.com> on 2009/11/17 10:13:30 UTC

How to create relevant spelling suggestions

Hi,
 
I was just working with spell check in SOLR 1.3 and came across this problem. 
My indexed data contains four artist names
 
1. Rihanna
2. Arianna
3. Michael
4. Michel
 
I was trying to implement spelling suggestions by saying spellcheck=true and spellcheck.build=true.
When I search for 
 
a. Rhianna (the correct word is Rihanna), I am getting a suggestion of Arianna and not Rihanna.
b. Micheal (the correct word is Michael), I am getting Michel instead of Michael which I expected.
 
Of all the fields in my index, I have copied only the artist field to spell in schema.xml.
 
I want RIHANNA to be suggested when I give the wrong term RHIANNA.
 
Also please hint as to what algorithm solr uses to get to these results.
 
Kindly help.
 
Manas.
 
 
 

Re: How to create relevant spelling suggestions

Posted by Lance Norskog <go...@gmail.com>.
http://wiki.apache.org/solr/SpellCheckComponent#Configuration

There are some tweaks for the spell checking responses. You can set
how accurate the spelling check. And you can pick a different
spell-checking distance algorithm.

Note also that you can make a spelling dictionary from a file that's
just a list of words. If you can directly create that list it is
easier to control the spelling returns. See the mention for
FileBasedSpellChecker and IndexBasedSpellChecker.


On Tue, Nov 17, 2009 at 1:13 AM, Nair, Manas <Ma...@mtvnmix.com> wrote:
> Hi,
>
> I was just working with spell check in SOLR 1.3 and came across this problem.
> My indexed data contains four artist names
>
> 1. Rihanna
> 2. Arianna
> 3. Michael
> 4. Michel
>
> I was trying to implement spelling suggestions by saying spellcheck=true and spellcheck.build=true.
> When I search for
>
> a. Rhianna (the correct word is Rihanna), I am getting a suggestion of Arianna and not Rihanna.
> b. Micheal (the correct word is Michael), I am getting Michel instead of Michael which I expected.
>
> Of all the fields in my index, I have copied only the artist field to spell in schema.xml.
>
> I want RIHANNA to be suggested when I give the wrong term RHIANNA.
>
> Also please hint as to what algorithm solr uses to get to these results.
>
> Kindly help.
>
> Manas.
>
>
>
>



-- 
Lance Norskog
goksron@gmail.com