lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Allison (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-11976) TokenizerChain is overwriting, not chaining in normalize()
Date Mon, 12 Feb 2018 21:10:00 GMT

     [ https://issues.apache.org/jira/browse/SOLR-11976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Allison updated SOLR-11976:
-------------------------------
    Affects Version/s:     (was: 7.2)
                       master (8.0)

> TokenizerChain is overwriting, not chaining in normalize()
> ----------------------------------------------------------
>
>                 Key: SOLR-11976
>                 URL: https://issues.apache.org/jira/browse/SOLR-11976
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: search
>    Affects Versions: master (8.0)
>            Reporter: Tim Allison
>            Priority: Major
>
> TokenizerChain is overwriting, not chaining tokenfilters in {{normalize}}.  
> This doesn't currently break search because {{normalize}} is not currently being used
at the Solr level (AFAICT); rather, TextField has its own {{analyzeMultiTerm()}} that duplicates
codes from the newer {{normalize}}. 
> Code as is:
> {noformat}
>     TokenStream result = in;
>     for (TokenFilterFactory filter : filters) {
>       if (filter instanceof MultiTermAwareComponent) {
>         filter = (TokenFilterFactory) ((MultiTermAwareComponent) filter).getMultiTermComponent();
>         result = filter.create(in);
>       }
>     }
> {noformat}
> The fix is simple:
> {noformat}
> -        result = filter.create(in);
> +        result = filter.create(result);
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message