Are Wildcard, Prefix, and Fuzzy queries case sensitive?
Created May 14, 2012
Otis Gospodnetic Yes, unlike other types of Lucene queries, Wildcard, Prefix, and Fuzzy queries are case sensitive.
That is because those types of queries are not passed through the Analyzer, which is the component that performs operations such as stemming and lowercasing.
The reason for skipping the Analyzer is that if you were searching for "dogs*" you would not want "dogs" first stemmed to "dog", since that would then match "dog*", which is not the
intended query.
A workaround for this is simply to lowercase the entire query before passing it to the query parser.
A workaround for this is simply to lowercase the entire query before passing it to the query parser.