SOLR case-sensitivty
April 27, 2007
We found what I’d consider to be a ‘bug’ yesterday, which is that SOLR is case-sensitive for wildcard searches by default. The SolrQueryParser runs setLowercaseExpandedTerms(false); when the default for LowerCaseExpandedTerms is ‘true’ in Lucene itself. I didn’t get a very convincing answer as to why it was changed - not that the answer wasn’t earnest and sincere, but it doesn’t strike me as valid.
I don’t consider it an oversight, but rather this whole analysis
business and wildcards are things that vary from project to project
on how they should be handled. If you, have, for example, a string
field and want to do prefixed queries on them (trailing asterisk) you
wouldn’t want the term to be lowercased.
That’s the explanation I got. So what my colleague is doing is making it a configurable switch to be changed in the solr config.xml file so we can change it to what we need without having to maintain a separate codebase. Hopefully the SOLR guys will accept the patch back.
Did you like this post? Buy me a hot chocolate!
Posted in 



