[ 
https://issues.apache.org/jira/browse/LUCENE-8129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16323919#comment-16323919
 ] 

Robert Muir commented on LUCENE-8129:
-------------------------------------

Thanks for the patch.

I don't like the change to the way the rules are loaded at all. Its now 
duplicated across the factory and the filter It also changes the constructor to 
load it from a file on every invocation whereas before it happened only once, 
this is too slow for any real use.

I think it is enough to just remove the keyword 'private' on the existing 
static instance, so that its package-private instead. Then the factory is able 
to access it, wrap it with a filter, and pass it to Normalizer2Filter.

> Support for defining a Unicode set filter when using ICUFoldingFilter
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-8129
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8129
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/analysis
>            Reporter: Ere Maijala
>            Priority: Minor
>              Labels: ICUFoldingFilterFactory, patch-available, patch-with-test
>         Attachments: SOLR-11811.patch
>
>
> While ICUNormalizer2FilterFactory supports a filter attribute to define a 
> Unicode set filter, ICUFoldingFilterFactory does not support it. A filter 
> allows one to e.g. exclude a set of characters from being folded. E.g. for 
> Finnish and Swedish the filter could be defined like this:
>       <filter class="solr.ICUFoldingFilterFactory" filter="[^åäöÅÄÖ]"/>
> Note: An additional MappingCharFilterFactory or solr.LowerCaseFilterFactory 
> would be needed for lowercasing the characters excluded from folding. This is 
> similar to what ElasticSearch provides (see 
> https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-icu-folding.html).
> I'll add a patch that does this similar to ICUNormalizer2FilterFactory. 
> Applies at least to master and branch_7x.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to