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 TxCSguy <ma...@gmail.com> on 2010/12/31 14:55:27 UTC

Spelling Suggestions vs Correction

Hi,

I am trying to clear up some confusion about SOLR's spell check
functionality.  Being new to SORL and Lucene as well, I was under the
assumption that spellcheck would take a query entered by a user and end up
actually querying the index based upon the corrections returned by the
spellcheck component.  

For example (referring to the sample data that comes with SOLR),  let's say
that the user issues a search for "sell" when what they really are looking
for is "dell".  So the spellcheck component is returning the suggestion of
"dell" (I can see this in the response) but still searching the index for
"sell".

So my questions are:
1) Is my example above a correct representation of what is happening by
incorporating the spellcheck component in?
2) Is there a way to actually search for the corrected version (dell) rather
than the original version (sell)?

Thanks in advance for any help,
Mark 
  


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Spelling-Suggestions-vs-Correction-tp2172572p2172572.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Spelling Suggestions vs Correction

Posted by Erick Erickson <er...@gmail.com>.
Ah, didn't tumble to that....

Not that I know of. I suspect that the way to handle this would be
to catch the response and inspect it and then fire off a second
query yourself in the middleware layer. That gives you the chance
to form the response page that the user sees and clearly show
that that you did something other than what they requested, even
though what they requested was nonsense.....

Best
Erick

On Sat, Jan 1, 2011 at 9:23 AM, TxCSguy <ma...@gmail.com> wrote:

>
>
>
> Thanks for the Reply Erick.  I read through the link you provided as well
> as
> http://wiki.apache.org/solr/TermsComponent
> http://wiki.apache.org/solr/TermsComponent  but that doesn't seem to be
> what
> I'm looking for.  If a user searches for "pell", is there a way to have
> SOLR
> modify the query such that the highest-ranked spell correction ("dell" in
> this example) is search for by the query component rather than "pell".
> Right
> now, it seems that all that is happening is that "dell" is being returned
> as
> a suggestion, but the query component is still searching with "pell".
>
> Thanks in advance!
>
> -Mark
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Spelling-Suggestions-vs-Correction-tp2172572p2176048.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Spelling Suggestions vs Correction

Posted by François Schiettecatte <fs...@gmail.com>.
I have just been playing around with spell check and from what I can tell it does not do that automatically, you would need to program that in your application yourself, basically run a search, check the spellcheck, run the search again if needed, and present the results to the user, not all that complicated and you could do that recursively since you would not get a spellcheck back on the second pass.

Cheers

François

On Jan 1, 2011, at 9:23 AM, TxCSguy wrote:

> 
> 
> 
> Thanks for the Reply Erick.  I read through the link you provided as well as 
> http://wiki.apache.org/solr/TermsComponent
> http://wiki.apache.org/solr/TermsComponent  but that doesn't seem to be what
> I'm looking for.  If a user searches for "pell", is there a way to have SOLR
> modify the query such that the highest-ranked spell correction ("dell" in
> this example) is search for by the query component rather than "pell". Right
> now, it seems that all that is happening is that "dell" is being returned as
> a suggestion, but the query component is still searching with "pell".
> 
> Thanks in advance!
> 
> -Mark 
> 
> 
> 
> 
> -- 
> View this message in context: http://lucene.472066.n3.nabble.com/Spelling-Suggestions-vs-Correction-tp2172572p2176048.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Spelling Suggestions vs Correction

Posted by TxCSguy <ma...@gmail.com>.


Thanks for the Reply Erick.  I read through the link you provided as well as 
http://wiki.apache.org/solr/TermsComponent
http://wiki.apache.org/solr/TermsComponent  but that doesn't seem to be what
I'm looking for.  If a user searches for "pell", is there a way to have SOLR
modify the query such that the highest-ranked spell correction ("dell" in
this example) is search for by the query component rather than "pell". Right
now, it seems that all that is happening is that "dell" is being returned as
a suggestion, but the query component is still searching with "pell".

Thanks in advance!

-Mark 




-- 
View this message in context: http://lucene.472066.n3.nabble.com/Spelling-Suggestions-vs-Correction-tp2172572p2176048.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Spelling Suggestions vs Correction

Posted by Erick Erickson <er...@gmail.com>.
Here's a discussion of the difference between them, does that answer?

http://lucene.472066.n3.nabble.com/spell-check-vs-terms-component-td1870214.html

Best
Erick

On Fri, Dec 31, 2010 at 8:55 AM, TxCSguy <ma...@gmail.com> wrote:

>
> Hi,
>
> I am trying to clear up some confusion about SOLR's spell check
> functionality.  Being new to SORL and Lucene as well, I was under the
> assumption that spellcheck would take a query entered by a user and end up
> actually querying the index based upon the corrections returned by the
> spellcheck component.
>
> For example (referring to the sample data that comes with SOLR),  let's say
> that the user issues a search for "sell" when what they really are looking
> for is "dell".  So the spellcheck component is returning the suggestion of
> "dell" (I can see this in the response) but still searching the index for
> "sell".
>
> So my questions are:
> 1) Is my example above a correct representation of what is happening by
> incorporating the spellcheck component in?
> 2) Is there a way to actually search for the corrected version (dell)
> rather
> than the original version (sell)?
>
> Thanks in advance for any help,
> Mark
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Spelling-Suggestions-vs-Correction-tp2172572p2172572.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>