[
https://issues.apache.org/jira/browse/SOLR-11976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16392345#comment-16392345
]
ASF subversion and git services commented on SOLR-11976:
--------------------------------------------------------
Commit de53746880edf0271ea967bf8b561cf5bc5a7194 in lucene-solr's branch
refs/heads/branch_7x from [~dsmiley]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=de53746 ]
SOLR-11976: TokenizerChain.normalize was only considering the first
MultiTermAwareComponent
(cherry picked from commit 588e19e)
> TokenizerChain is overwriting, not chaining TokenFilters 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
> Assignee: David Smiley
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> TokenizerChain is overwriting, not chaining tokenfilters in {{normalize}}.
> This doesn't currently break search because {{normalize}} is not being used
> at the Solr level (AFAICT); rather, TextField has its own
> {{analyzeMultiTerm()}} that duplicates code 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: [email protected]
For additional commands, e-mail: [email protected]