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

Ahmet Arslan commented on LUCENE-5620:
--------------------------------------

[~rcmuir] , here is another ammo:  ASCIIFoldingFilter's preserveOriginal=true 
breaks wildcard queries, since it is a MultiTermAwareComponent.

{code:xml}
  <fieldType name="text_general" class="solr.TextField" 
positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.StandardTokenizerFactory"/>            
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ASCIIFoldingFilterFactory" preserveOriginal="true"/>
      </analyzer>      
    </fieldType>
{code}

With the above type, {{q=manu:Belkı*}} yields: 

{code}
 "error": {
    "msg": "analyzer returned too many terms for multiTerm term: Belkı",
    "code": 400
  } 
{code}

I think preserveOriginal is dangerous for token filters that implement 
MultiTermAwareComponent. 
What is the preferred action here? Document this limitation/behavior? Or 
consider this as a bug and open a jira?

> 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]

Reply via email to