No, it doesn't work, I got weird result. I set my city name field to be parsed as a token as following:
<fieldType name="autocomplete1" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> I got following result for spellcheck: <lstname="spellcheck"> - <lstname="suggestions"> - <lstname="san"> <intname="numFound">1</int> <intname="startOffset">0</int> <intname="endOffset">3</int> - <arrname="suggestion"> <str>swan</str> </arr> </lst> - <lstname="clar"> <intname="numFound">1</int> <intname="startOffset">4</int> <intname="endOffset">8</int> <arrname="suggestion"> <str>clark</str> </arr> </lst> </lst> ________________________________ From: Tom Hill <solr-l...@worldware.com> To: solr-user@lucene.apache.org Sent: Mon, September 27, 2010 3:52:48 PM Subject: Re: Need help with spellcheck city name Maybe process the city name as a single token? On Mon, Sep 27, 2010 at 3:25 PM, Savannah Beckett <savannah_becket...@yahoo.com> wrote: > Hi, > I have city name as a text field, and I want to do spellcheck on it. I use > setting in http://wiki.apache.org/solr/SpellCheckComponent > > If I setup city name as text field and do spell check on "San Jos" for San >Jose, > I get suggestion for Jos as "ojos". I checked the extendedresult and I found > that Jose is in the middle of all 10 suggestions in term of score and > frequency. I then set city name as string field, and spell check again, I got > Van for San and Ross for Jos, which is weird because San is correct. > > > How do you setup spellchecker to spellcheck city names? City name can have > multiple words. > Thanks. > > >