开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜