You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "MarcusSorealheis (via GitHub)" <gi...@apache.org> on 2023/05/03 19:52:06 UTC

[GitHub] [lucene] MarcusSorealheis commented on issue #12259: Case insensitive search

MarcusSorealheis commented on issue #12259:
URL: https://github.com/apache/lucene/issues/12259#issuecomment-1533645232

   You are. The prescribe method for dealing with this sort of pre-processing is through using the analysis chain.
   
   If you add this line (and associated imports) to the top of this snippet you should be good to go:
   
   `StandardAnalyzer analyzer = new StandardAnalyzer();`
   
   Keep in mind that the standard analyzer does not process things like stop words, so the text should be largely unaffected. If you only want to affect case strictness, you can look into the [LowerCaseFilter](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/analysis/LowerCaseFilter.java) applied at the character level. Be sure to apply at index- and query-time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org