Question

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 not 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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top