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

Steve Rowe commented on LUCENE-6206:
------------------------------------

Here's the JIRA corresponding to JI-9018602: 
https://bugs.openjdk.java.net/browse/JDK-8071862

> TestCollationDocValuesField.testRanges failure
> ----------------------------------------------
>
>                 Key: LUCENE-6206
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6206
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>
> This test failed in branch_5x:
> {noformat}
> ant test  -Dtestcase=TestCollationDocValuesField -Dtests.method=testRanges 
> -Dtests.seed=8729A11DAE9AE179 -Dtests.multiplier=3 -Dtests.slow=true 
> -Dtests.locale=lt -Dtests.timezone=Etc/GMT-8 -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8
> {noformat}
> The problem is, with lithuanian collator, the generated collationkey does not 
> agree with collation order.
> In other words: collator.compare("yi", "iy") != 
> collator.getCollationKey("yi").compareTo(collator.getCollationKey("iy"))
> Simple test:
> {code}
> import java.text.Collator;
> import java.util.Locale;
> public class TestLithuanian {
>   public static void main(String args[]) throws Exception {
>     Collator collator = Collator.getInstance(new Locale("lt"));
>     int value = collator.compare("yi", "iy");
>     System.out.println(value); // returns 1
>     int value2 = 
> collator.getCollationKey("yi").compareTo(collator.getCollationKey("iy"));
>     System.out.println(value2); // returns -1
>   }
> }
> {code}
> Note that if you change java.text.Collator to com.ibm.icu.text.Collator, they 
> are consistent. Looks like a bug in JDK collation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to