You could write a custom Filter (or perhaps Tokenizer), but I usually just do it on the input side before things get sent to Solr.
I don't think PatternReplaceCharFilterFactory will help, you could easily turn the input into original:original, but then you'd need to write a custom filter that normalized the left-hand-side but not the right-hand-side.... Best Erick On Tue, Jan 15, 2013 at 11:27 AM, Selvam <s.selvams...@gmail.com> wrote: > Thanks Erick, can you tell me how to do the appending > (lowercaseversion:LowerCaseVersion) before indexing. I tried pattern > factory filters, but I could not get it right. > > > On Sun, Jan 13, 2013 at 8:49 PM, Erick Erickson > <erickerick...@gmail.com>wrote: > >> One way I've seen this done is to index pairs like >> lowercaseversion:LowerCaseVersion. You can't push this whole thing through >> your field as defined since it'll all be lowercased, you have to produce >> the left hand side of the above yourself and just use KeywordTokenizer >> without LowercaseFilter. >> >> Then, your application displays the right-hand-side of the returned token. >> >> Simple solution, not very elegant, but sometimes the easiest... >> >> Best >> Erick >> >> >> On Fri, Jan 11, 2013 at 1:30 AM, Selvam <s.selvams...@gmail.com> wrote: >> >> > Hi*, >> > >> > * >> > I have been trying to figure out a way for case insensitive suggestion >> but >> > which should return original phrase as result.* *I am using* *solr 3.5* >> > >> > * >> > *For eg: >> > >> > * >> > If I index 'Hello world' and search for 'hello' it needs to return >> *'Hello >> > world'* not *'hello world'. *My configurations are as follows,* >> > * >> > * >> > New field type:* >> > <fieldType class="solr.TextField" name="text_auto"> >> > <analyzer> >> > <tokenizer class="solr.KeywordTokenizerFactory" /> >> > <filter class="solr.LowerCaseFilterFactory"/> >> > </analyzer> >> > >> > *Field values*: >> > <field name="label" type="text" indexed="true" stored="true" >> > termVectors="true" omitNorms="true"/> >> > <field name="label_autocomplete" type="text_auto" indexed="true" >> > stored="true" multiValued="false"/> >> > <copyField source="label" dest="label_autocomplete" /> >> > >> > *Spellcheck Component*: >> > <searchComponent name="suggest" class="solr.SpellCheckComponent"> >> > <str name="queryAnalyzerFieldType">text_auto</str> >> > <lst name="spellchecker"> >> > <str name="name">suggest</str> >> > <str >> name="classname">org.apache.solr.spelling.suggest.Suggester</str> >> > <str >> > name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str> >> > <str name="buildOnOptimize">true</str> >> > <str name="buildOnCommit">true</str> >> > <str name="field">label_autocomplete</str> >> > </lst> >> > </searchComponent> >> > >> > >> > Kindly share your suggestions to implement this behavior. >> > >> > -- >> > Regards, >> > Selvam >> > KnackForge <http://knackforge.com> >> > Acquia Service Partner >> > No. 1, 12th Line, K.K. Road, Venkatapuram, >> > Ambattur, Chennai, >> > Tamil Nadu, India. >> > PIN - 600 053. >> > >> > > > > -- > Regards, > Selvam > KnackForge <http://knackforge.com> > Acquia Service Partner > No. 1, 12th Line, K.K. Road, Venkatapuram, > Ambattur, Chennai, > Tamil Nadu, India. > PIN - 600 053.