[
https://issues.apache.org/jira/browse/LUCENE-5620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982404#comment-13982404
]
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: https://issues.apache.org/jira/browse/LUCENE-5620
> 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
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]