lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Sokolov (JIRA)" <>
Subject [jira] [Commented] (LUCENE-5620) LowerCaseFilter.preserveOriginal
Date Sun, 27 Apr 2014 17:45:18 GMT


Mike Sokolov commented on LUCENE-5620:

I would just note that the primary use case for this kind of functionality (whether embedded
in the filter, or using a wrapping approach) is on the index side, not on the query side.
If you are preserving the original case (or diacritics, or whatever) in the index, why do
you need to collapse the terms in the query?  If you leave them alone you get more precise
matching, which for me at least, is the whole point.  If you are going to collapse the query
terms when searching, there's no reason to preserve the originals in the index.  

So that last comment may be a bit of a red herring?  Still it is a trap for the unwary, and
in general the wrapping preserve/restore filter seems like a better approach to me.

> LowerCaseFilter.preserveOriginal
> --------------------------------
>                 Key: LUCENE-5620
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Mike Sokolov
>         Attachments: LUCENE-5620.patch, LUCENE-5620.patch
> Following closely the model of LUCENE-5437 (which worked on ASCIIFoldingFilter), this
patch adds the ability to preserve the original token to LowerCaseFilter.  This is useful
if you want an all-lowercase search term to match without regard to case, while search terms
with uppercase letters match in a case-sensitive manner. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message