Reputation: 11143
I need to make a Lucene exact case insensitive keyword match query.
I tried using KeywordAnalyzer but it's case sensitive ...
Sample :
Keyword : "Windows Server 2003" => Got Results
Keyword : "windows server 2003" => No results ...
Another sample (multi keywords) :
Keywords : "ASP.NET, SQL Server" => Got results
Keywords : "asp.net, sql server" => No results
Upvotes: 0
Views: 2367
Reputation: 433
I never used lucene, but from what I found on google, StopAnalyzer and SimpleAnalyzer seem to use a LowerCaseFilter.
As a last resort, you can build a custom analyzer, inheriting from the abstract base class "Analyzer".
Much of what I found you can read on this page: http://www.codeproject.com/KB/cs/lucene_analysis.aspx, in which you can even find a sample app that can help you :)
Upvotes: 1