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

Shelley Lynn Hughes-Godfrey commented on GEODE-3954:
----------------------------------------------------

Committed to develop
{noformat}
commit 01dc11fc51bdaacefccf66f7d7d449a40a6e6a45
Author: Lynn Hughes-Godfrey <[email protected]>
Date:   Fri Nov 3 14:59:55 2017 -0700

    GEODE-3953: Incorrect use of .equals() for comparison of fieldname arrays
    GEODE-3954: Misleading Exception message with mismatched fieldAnalyzers
    
    - corrected equals comparisons of fieldname arrays
    - corrected Exception message for mismatched fieldAnalyzers to refer to 
field analyzers (vs. fieldnames) when remote and local fieldAnalyzers are 
different sizes
    - corrected Exception message to display fieldAnalyzers vs. fieldnames when 
remote and local fieldAnalyzer maps are different sizes
{noformat}

> Lucene create index can fail with misleading exception if fieldAnalyzers are 
> different between members
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-3954
>                 URL: https://issues.apache.org/jira/browse/GEODE-3954
>             Project: Geode
>          Issue Type: Bug
>          Components: lucene
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Shelley Lynn Hughes-Godfrey
>            Assignee: Shelley Lynn Hughes-Godfrey
>            Priority: Trivial
>             Fix For: 1.4.0
>
>
> {noformat}
> if (!getFieldAnalyzers().equals(remoteProfile.getFieldAnalyzers())) {
>       if (getFieldAnalyzers().size() != 
> remoteProfile.getFieldAnalyzers().size()) {
>         return 
> LocalizedStrings.LuceneService_CANNOT_CREATE_INDEX_0_ON_REGION_1_WITH_FIELDS_2_BECAUSE_ANOTHER_MEMBER_DEFINES_THE_SAME_INDEX_WITH_FIELDS_3
>             .toString(getIndexName(), regionPath,
>                 Arrays.toString(getFieldAnalyzers().keySet().toArray()),
>                 
> Arrays.toString(remoteProfile.getFieldAnalyzers().keySet().toArray()));
>       }
> {noformat}
> The LocalizedString here should be this:
> {noformat}
>         return 
> LocalizedStrings.LuceneService_CANNOT_CREATE_INDEX_0_ON_REGION_1_WITH_FIELD_ANALYZERS_2_BECAUSE_ANOTHER_MEMBER_DEFINES_THE_SAME_INDEX_WITH_FIELD_ANALYZERS_3
>             .toString(getIndexName(), regionPath,
>                 Arrays.toString(getFieldAnalyzers().keySet().toArray()),
>                 
> Arrays.toString(remoteProfile.getFieldAnalyzers().keySet().toArray()));
> {noformat}



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

Reply via email to