Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Are Wildcard, Prefix, and Fuzzy queries case sensitive?

0
Posted

Are Wildcard, Prefix, and Fuzzy queries case sensitive?

0

No, but unlike other types of CLucene queries, Wildcard, Prefix, and Fuzzy queries are not passed through the `Analyzer`, which is the component that performs operations such as stemming. 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.

0

No, not by default. Unlike other types of Lucene queries, Wildcard, Prefix, and Fuzzy 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. These queries are case-insensitive anyway because QueryParser makes them lowercase. This behavior can be changed using the setLowercaseExpandedTerms(boolean) method.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.