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 rajini maski <ra...@gmail.com> on 2010/12/06 07:37:10 UTC

Solr -File Based Spell Check

How does the solr file based spell check work?

How do we need to enter data in the spelling.txt...I am not clear about its
functionality..If anyone know..Please reply.

I want to index a word = Wear
But while searching I search as =Dress
I want to get results for Wear.. How do i apply this functionality..

Awaiting Reply

Re: Solr -File Based Spell Check

Posted by ramzesua <mi...@gmail.com>.
Hi. As I know, for file based spellcheck you need:
 - configure you spellcheck seach component in solrconfig.xml, for example:

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

 - then you must get or form spellings.txt, for example:
abaft 
abalone 
abalones 
abandon 
abandoned 
abandonedly 
... 
(each correct word in new line)

 - after that you must build you file to index:
http://wiki.apache.org/solr/SpellCheckComponent#spellcheck.build
for build try do to this:
http://solr:8983/solr/select?q=*:*&spellcheck=true&spellcheck.build=true

After that you can use spellcheck in your search, for example:
http://solr:8983/solr/select?q=bingo&spellcheck=true

Try this, if there is some errors, post here..
P.S. please, read http://wiki.apache.org/solr/SpellCheckComponent for more
information


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-File-Based-Spell-Check-tp2025671p2027258.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr -File Based Spell Check

Posted by rajini maski <ra...@gmail.com>.
Yeah..  I wanna use this Spell-check only.. I want to create myself the
dictionary.. And give it as input to solr.. Because my indexes also have
mis-spelled content and so I want solr to refer this file and not
autogenrated. How do i get this done?

I will try the spell check as suggested by  michael...

One more main thing I wanted to know is,  how to extract the dictionary
generated by default.?  How do i read this  .cfs files generated in index
folder..

Please reply if you know anything related to this..


Awaiting reply




On Mon, Dec 6, 2010 at 7:33 PM, Erick Erickson <er...@gmail.com>wrote:

> Are you sure you want spellcheck/autosuggest?
>
> Because what you're talking about almost sounds like
> synonyms.....
>
> Best
> Erick
>
> On Mon, Dec 6, 2010 at 1:37 AM, rajini maski <ra...@gmail.com>
> wrote:
>
> > How does the solr file based spell check work?
> >
> > How do we need to enter data in the spelling.txt...I am not clear about
> its
> > functionality..If anyone know..Please reply.
> >
> > I want to index a word = Wear
> > But while searching I search as =Dress
> > I want to get results for Wear.. How do i apply this functionality..
> >
> > Awaiting Reply
> >
>

Re: Solr -File Based Spell Check

Posted by Erick Erickson <er...@gmail.com>.
Are you sure you want spellcheck/autosuggest?

Because what you're talking about almost sounds like
synonyms.....

Best
Erick

On Mon, Dec 6, 2010 at 1:37 AM, rajini maski <ra...@gmail.com> wrote:

> How does the solr file based spell check work?
>
> How do we need to enter data in the spelling.txt...I am not clear about its
> functionality..If anyone know..Please reply.
>
> I want to index a word = Wear
> But while searching I search as =Dress
> I want to get results for Wear.. How do i apply this functionality..
>
> Awaiting Reply
>