Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B54A49C42 for ; Fri, 29 Jun 2012 03:12:48 +0000 (UTC) Received: (qmail 30823 invoked by uid 500); 29 Jun 2012 03:12:47 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 30608 invoked by uid 500); 29 Jun 2012 03:12:45 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 30570 invoked by uid 99); 29 Jun 2012 03:12:44 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2012 03:12:44 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 9A1E114002F for ; Fri, 29 Jun 2012 03:12:43 +0000 (UTC) Date: Fri, 29 Jun 2012 03:12:42 +0000 (UTC) From: "Nattapong Sirilappanich (JIRA)" To: dev@lucene.apache.org Message-ID: <1990104865.70331.1340939563633.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1479828400.66304.1340884306105.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (LUCENE-4176) Can not produce proper collation key for ICUCollatedTermAttributeImp MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4176?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D134= 03675#comment-13403675 ]=20 Nattapong Sirilappanich commented on LUCENE-4176: ------------------------------------------------- Thanks for the fix and sorry for any confusions. =20 > Can not produce proper collation key for ICUCollatedTermAttributeImp > -------------------------------------------------------------------- > > Key: LUCENE-4176 > URL: https://issues.apache.org/jira/browse/LUCENE-4176 > Project: Lucene - Java > Issue Type: Bug > Components: modules/queryparser > Affects Versions: 5.0 > Reporter: Nattapong Sirilappanich > Fix For: 4.0, 5.0 > > Attachments: LUCENE-4176.patch, LUCENE-4176.patch > > > org.apache.lucene.collation.tokenattributes.ICUCollatedTermAttributeImpl = return a hash of collation key's byte. > The given hash value produce incorrect comparison result. > The source code below return 1 for Lucene 3.6. > The code here return 0. > Code to reproduce: > IndexWriter writer =3D new IndexWriter(ramDir, conf); > Document doc =3D new Document(); > FieldType fieldType =3D new FieldType(); > fieldType.setIndexed(true); > fieldType.setStored(true); > Field field =3D new Field("content","=E0=B9=80=E0=B8=82", fieldType); > doc.add(field); > writer.addDocument(doc); > writer.close(); > IndexSearcher is =3D new IndexSearcher(DirectoryReader.open(ramDir)); > QueryParser qp =3D new AnalyzingQueryParser(Version.LUCENE_50,"content", = analyzer); > ScoreDoc[] result =3D is.search(qp.parse("[\u0e01 TO \u0e03]"), null,1000= ).scoreDocs; > System.out.println(result.length); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org