Unfortunately, collate doesn't verify that the collated result
actually results in hits. So, it is likely that each term returns
results, but that doesn't mean the collation does. We probably should
add to the SpellCheckComponent to have an option to check to see if
the collation is going to result in hits.
Whether there are hits for the collation or not can also depend on how
you are doing query parsing and what default operator you are using.
-Grant
On Mar 17, 2009, at 12:05 PM, Shyamsunder Reddy wrote:
I think if you use spellcheck.collate=true, you will still receive the
results for correct word and suggestion for wrong word.
I have name field (which is first name+last name) configured for spell
check. I have name entry: GUY SHUMAKER. I am trying to find out
person
names where either 'GUY' or 'SHUMAKER' or both are spelled wrong.
1. Last Name spelled wrong as 'SHAMAKER'
http://localhost:8090/solr/select?q=NAME:GUY%20SHAMAKER&fq=TYPE:PERSON&spellcheck=true&spellcheck.collate=true
It return all results that match 'GUY' and spelling suggestion for
'SHAMAKER' as 'SHUMAKER'
2. First Name spelled wrong as 'GYY'
http://localhost:8090/solr/select?q=NAME:GYY
SHUMAKER&fq=TYPE:PERSON&spellcheck=true&spellcheck.collate=true
It return No results and spelling suggestion for 'GYY' as 'GUY' and
collation as <str name="collation">NAME:guy SHUMAKER</str>
Note:But here I expected result that match SHUAMKER
3. Both first name and last name spelled wrong as: GYY SHAMAKER
http://localhost:8090/solr/select?q=NAME:GYY%20SHAMAKER&fq=TYPE:PERSON&spellcheck=true&spellcheck.collate=true
Here no results, but received suggestion for both words and collation.
It is similar to your scenario?
Also why NO results are returned for case 2.
--- On Tue, 3/17/09, Ingo Renner <i...@typo3.org> wrote:
From: Ingo Renner <i...@typo3.org>
Subject: spellchecker: returning results even with misspelt words
To: solr-user@lucene.apache.org
Date: Tuesday, March 17, 2009, 9:52 AM
Hi all,
I'd like to achieve the following:
When searching for e.g. two words, one of them being spelt correctly
the other one misspelt I'd like to receive results for the correct
word but would still like to get spelling suggestions for the wrong
word.
Currently when I search for misspelt words I get suggestions, but no
results at all although there would be results when searching for
the correct word only.
Hope you understand what I want to achieve as it's a little hard to
explain.
all the best
Ingo
--Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2