You should be building your index on a field that creates tokens on whitespace.
So your dictionary would have iphone and case as separate terms instead of
iphone case as one term. And if you query on something like iphole case,
it will give suggestions for iphole but not for case because the later is
in the dictionary. (The spellchecker will always assume a term is correctly
spelled if it is in the Dictionary).
If you set collate=true, in addition to getting word-by-word suggestions, it
will return a re-written query (aka a collation). SOLR 1.4 wil always use
the top suggestions for each word to form the collation. In this example, the
collation would be iphone case. You can then requery SOLR with the collation
and hope to get better hits. While 1.4 doesn't check to see if the collation
is going to return any hits, an enhancement to 3.x and 4.0 allows you to
guarantee that collations will always give you hits if you requery them.
As for your second question, likely ipj is close enough to ipad to warrant
a suggestion but the others are not considered close enough. You can tweak
this by setting spellcheck.accuracy. However, I do not believe this option is
available in 1.4. The wiki indicates it is 3.x/4.0 only.
For more information, look at the SpellCheckComponent page on the wiki.
James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311
-Original Message-
From: abhayd [mailto:ajdabhol...@hotmail.com]
Sent: Thursday, October 28, 2010 4:34 PM
To: solr-user@lucene.apache.org
Subject: spellchecker results not as desired
hi
I added spellchecker to request handler. Spellchecker is indexed based.
Terms in index are like
iphone
iphone 4
iphone case
phone
gophoe
when i set q=iphole i get suggestions like
iphone
phone
gophone
ipad
Not sure how would i get iphone, iphone 4, iphone case, phone. Any thoughts?
At the same time when i type ipj
i get result as ipad, why not iphone, iphone 4 , ipad
--
View this message in context:
http://lucene.472066.n3.nabble.com/spellchecker-results-not-as-desired-tp1789192p1789192.html
Sent from the Solr - User mailing list archive at Nabble.com.