Hi Kalyan,

Currently the spell checker does not support phrase based suggestions. See http://lucene.markmail.org/message/wdr7wsenhtuecatb?q=spellcheck+list:org%2Eapache%2Elucene%2Esolr-user and a variety of other links.

Now, I think there are a couple of things you could do.

1. Try n-grams (shingles) for a spelling field, such that things like "Grand Hyatt" end up in the dictionary. My guess is you probably would want 1, 2 and 3 grams.

2. Produce a patch to the component that takes the collation and uses a specified query parser to check to see if there are results for the collation.

3. You could just do #2 programmatically in your application, which would result in a 2nd query, or as a separate query component that works off of the collation field.


HTH,
Grant

On Nov 25, 2008, at 3:17 PM, Manepalli, Kalyan wrote:

Hi,

           I am trying to implement a spell check functionality on a
particular field. I need to do a complete phrase spell check when user
enters multiple words.



For eg: If the user enters "great Hyat" the current implementation would suggest "great Hyatt", just correcting the word "hyatt". But there will
not be any record for this suggestion.

How do I implement a complete phrase spell check, so that it suggests
"grand Hyatt" instead of "great Hyatt".



Any suggestions in this regard will be helpful



Thanks,

Kalyan Manepalli




Reply via email to