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 Ryan McKinley <ry...@gmail.com> on 2008/07/15 21:49:03 UTC

FileBasedSpellChecker behavior?

Hi-

I'm messing with spellchecking and running into behavior that seems  
peculiar.  We have an index with many words including:
"swim" and "slim"

If I search for "slim", it returns "swim" as an option -- likewise, if  
I search for "slim" it returns "swim"

why does it check words that are in the dictionary?  This does not  
seem to be the behavior for IndexBasedSpellChecker.

- - - -

Perhaps the FileBasedSpellChecker should load the configs at startup.   
It is too strange to have to call load each time the index starts.  It  
should just implement solrCoreAware() and then load the file at startup.

thanks
ryan

Re: FileBasedSpellChecker behavior?

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Also see https://issues.apache.org/jira/browse/SOLR-622

On Wed, Jul 16, 2008 at 2:25 AM, Yonik Seeley <yo...@apache.org> wrote:

> On Tue, Jul 15, 2008 at 4:19 PM, Grant Ingersoll <gs...@apache.org>
> wrote:
> > agreed, but there is a problem in Solr, AIUI, with regards to when the
> > readers are available and when inform() gets called.  The workaround is
> to
> > have a warming query, I believe.
>
> Right... see https://issues.apache.org/jira/browse/SOLR-593
>
> -Yonik
>



-- 
Regards,
Shalin Shekhar Mangar.

Re: FileBasedSpellChecker behavior?

Posted by Yonik Seeley <yo...@apache.org>.
On Tue, Jul 15, 2008 at 4:19 PM, Grant Ingersoll <gs...@apache.org> wrote:
> agreed, but there is a problem in Solr, AIUI, with regards to when the
> readers are available and when inform() gets called.  The workaround is to
> have a warming query, I believe.

Right... see https://issues.apache.org/jira/browse/SOLR-593

-Yonik

Re: FileBasedSpellChecker behavior?

Posted by Grant Ingersoll <gs...@apache.org>.
On Jul 15, 2008, at 3:49 PM, Ryan McKinley wrote:

> Hi-
>
> I'm messing with spellchecking and running into behavior that seems  
> peculiar.  We have an index with many words including:
> "swim" and "slim"
>
> If I search for "slim", it returns "swim" as an option -- likewise,  
> if I search for "slim" it returns "swim"
>
> why does it check words that are in the dictionary?  This does not  
> seem to be the behavior for IndexBasedSpellChecker.

I think it can depend on your options, but there are reasons to check  
even if a word is in the dictionary (although w/ FileBased, it's not  
as obvious.)  Namely, there can be "better" spellings available.  The  
strange thing is, I believe, the Lucene Spell checker should be  
handling this, but your not the first to report the oddity.

>
>
> - - - -
>
> Perhaps the FileBasedSpellChecker should load the configs at  
> startup.  It is too strange to have to call load each time the index  
> starts.  It should just implement solrCoreAware() and then load the  
> file at startup.

agreed, but there is a problem in Solr, AIUI, with regards to when the  
readers are available and when inform() gets called.  The workaround  
is to have a warming query, I believe.

>
>
> thanks
> ryan