[
https://issues.apache.org/jira/browse/LUCENE-5620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Muir updated LUCENE-5620:
--------------------------------
Attachment: LUCENE-5620.patch
Here is a prototype patch. The cleaner way is the faster way too:
* Doesn't slowdown users who dont care about such things (the
LowerCaseFilter.preserveOriginal patch would slowdown all lucene users with its
call to isUppercase)
* Doesn't need to actually capture/restore state: we only need to save term
text and position. Its just to inject a synonym, stuff like offsets dont need
to be saved, no filter should be changing them anyway :)
I didnt yet remove the existing preserveOriginal cancer about the codebase, but
thats easy. and the factories that have it can still work with the option (just
wrap the filter with these guys).
> 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]