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 7DAD8DD45 for ; Thu, 28 Jun 2012 11:57:49 +0000 (UTC) Received: (qmail 40562 invoked by uid 500); 28 Jun 2012 11:57:46 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 39628 invoked by uid 500); 28 Jun 2012 11:57: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 39602 invoked by uid 99); 28 Jun 2012 11:57:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2012 11:57:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id DEAB5142849 for ; Thu, 28 Jun 2012 11:57:43 +0000 (UTC) Date: Thu, 28 Jun 2012 11:57:43 +0000 (UTC) From: "Robert Muir (JIRA)" To: dev@lucene.apache.org Message-ID: <1414199045.66316.1340884663913.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= 03038#comment-13403038 ]=20 Robert Muir commented on LUCENE-4176: ------------------------------------- Thanks for reporting this: the bug is actually AnalyzingQueryParser. it sho= uld not consume with CharTermAttribute.toString(), instead it should just c= onsume the bytes. =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 > > 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