Re: Solr suggest - How to define solr suggest as case insensitive
I have added it and it didnt work. Still returning different result to 1=C and q=c On Tue, Sep 10, 2013 at 1:52 AM, Chris Hostetter hossman_luc...@fucit.orgwrote: : This is probably because your dictionary is made up of all lower case tokens, : but when you query the spell-checker similar analysis doesnt happen. Ideal : case would be when you query the spellchecker you send lower case queries You can init the SpellCheckComponent with a queryAnalyzerFieldType option that will control what analysis happens. ie... !-- This field type's analyzer is used by the QueryConverter to tokenize the value for q parameter -- str name=queryAnalyzerFieldTypephrase_suggest/str ...it would be nice if this defaulted to using the fieldType of hte field you configure on the Suggester, but not all Impls are based on the index (you might be using an external dict file) so it has to be explicitly configured, and defaults to using a simple WhitespaceAnalyzer. -Hoss
Re: Solr suggest - How to define solr suggest as case insensitive
This is probably because your dictionary is made up of all lower case tokens, but when you query the spell-checker similar analysis doesnt happen. Ideal case would be when you query the spellchecker you send lower case queries -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-suggest-How-to-define-solr-suggest-as-case-insensitive-tp4088764p4088918.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr suggest - How to define solr suggest as case insensitive
: This is probably because your dictionary is made up of all lower case tokens, : but when you query the spell-checker similar analysis doesnt happen. Ideal : case would be when you query the spellchecker you send lower case queries You can init the SpellCheckComponent with a queryAnalyzerFieldType option that will control what analysis happens. ie... !-- This field type's analyzer is used by the QueryConverter to tokenize the value for q parameter -- str name=queryAnalyzerFieldTypephrase_suggest/str ...it would be nice if this defaulted to using the fieldType of hte field you configure on the Suggester, but not all Impls are based on the index (you might be using an external dict file) so it has to be explicitly configured, and defaults to using a simple WhitespaceAnalyzer. -Hoss
Solr suggest - How to define solr suggest as case insensitive
My suggest (spellchecker) is returning case sensitive answers. (I use it to autocomplete - dog and Dog return different phrases)\ my suggest is defined as follows - in solrconfig - searchComponent class=solr.SpellCheckComponent name=suggest lst name=spellchecker str name=namesuggest/str str name=classnameorg.apache.solr.spelling.suggest.Suggester/str str name=lookupImplorg.apache.solr.spelling.suggest.tst.TSTLookup/str str name=fieldsuggest/str !-- the indexed field to derive suggestions from -- float name=threshold0.005/float str name=buildOnCommittrue/str !--str name=sourceLocationamerican-english/str-- /lst /searchComponent requestHandler class=org.apache.solr.handler.component.SearchHandler name=/suggest lst name=defaults str name=spellchecktrue/str str name=spellcheck.dictionarysuggest/str str name=spellcheck.onlyMorePopulartrue/str str name=spellcheck.count5/str str name=spellcheck.collatetrue/str /lst arr name=components strsuggest/str /arr /requestHandler in schema field name=suggest type=phrase_suggest indexed=true stored=true required=false multiValued=true/ and copyField source=Name dest=suggest/ and fieldtype name=phrase_suggest class=solr.TextField analyzer tokenizer class=solr.KeywordTokenizerFactory/ filter class=solr.PatternReplaceFilterFactory pattern=([^\p{L}\p{M}\p{N}\p{Cs}]*[\p{L}\p{M}\p{N}\p{Cs}\_]+:)|([^\p{L}\p{M}\p{N}\p{Cs}])+ replacement= replace=all/ filter class=solr.LowerCaseFilterFactory/ filter class=solr.TrimFilterFactory/ /analyzer /fieldtype