Turn off case sensitivity in SolrNet fields
I am facing a problem with the case sensitivity of SolrNet Filters. e.g. new SolrQueryByField("City", "Chicago") returns the results but SolrQueryByField("City", "chicago") does not return anything because "chicago" is in lower case.
I am no开发者_如何学运维t sure how to turn case sensitivity off for filters. I don't want any of my fields to be case sensitive, how can i achieve this?
Field City
is probably unanalyzed (i.e. of type solr.StrField
). Make sure it uses a TextField
with LowerCaseFilterFactory
. See for example text_general
in the sample Solr schema. After changing your schema you'll have to rebuild your index.
精彩评论