Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 67962 invoked from network); 22 Apr 2010 20:08:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Apr 2010 20:08:14 -0000 Received: (qmail 68685 invoked by uid 500); 22 Apr 2010 20:08:13 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 68618 invoked by uid 500); 22 Apr 2010 20:08:12 -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 68611 invoked by uid 500); 22 Apr 2010 20:08:12 -0000 Delivered-To: apmail-lucene-java-dev@lucene.apache.org Received: (qmail 68608 invoked by uid 99); 22 Apr 2010 20:08:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 20:08:12 +0000 X-ASF-Spam-Status: No, hits=-1333.6 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Apr 2010 20:08:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3MK7pDx019725 for ; Thu, 22 Apr 2010 20:07:51 GMT Message-ID: <14841081.146971271966871272.JavaMail.jira@thor> Date: Thu, 22 Apr 2010 16:07:51 -0400 (EDT) From: "Robert Muir (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-1032) CJKAnalyzer should convert half width katakana to full width katakana In-Reply-To: <2524290.1193292890848.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Muir resolved LUCENE-1032. --------------------------------- Resolution: Duplicate Normalization is implemented in LUCENE-2399 > CJKAnalyzer should convert half width katakana to full width katakana > --------------------------------------------------------------------- > > Key: LUCENE-1032 > URL: https://issues.apache.org/jira/browse/LUCENE-1032 > Project: Lucene - Java > Issue Type: Improvement > Components: Analysis > Affects Versions: 2.0.0 > Reporter: Andrew Lynch > > Some of our Japanese customers are reporting errors when performing searches using half width characters. > The desired behavior is that a document containing half width characters should be returned when performing a search using full width equivalents or when searching by the half width character itself. > Currently, a search will not return any matches for half width characters. > Here is a test case outlining desired behavior (this may require a new Analyzer). > {code} > public class TestJapaneseEncodings extends TestCase > { > byte[] fullWidthKa = new byte[]{(byte) 0xE3, (byte) 0x82, (byte) 0xAB}; > byte[] halfWidthKa = new byte[]{(byte) 0xEF, (byte) 0xBD, (byte) 0xB6}; > public void testAnalyzerWithHalfWidth() throws IOException > { > Reader r1 = new StringReader(makeHalfWidthKa()); > TokenStream stream = new CJKAnalyzer().tokenStream("foo", r1); > assertNotNull(stream); > Token token = stream.next(); > assertNotNull(token); > assertEquals(makeFullWidthKa(), token.termText()); > } > public void testAnalyzerWithFullWidth() throws IOException > { > Reader r1 = new StringReader(makeFullWidthKa()); > TokenStream stream = new CJKAnalyzer().tokenStream("foo", r1); > assertEquals(makeFullWidthKa(), stream.next().termText()); > } > private String makeFullWidthKa() throws UnsupportedEncodingException > { > return new String(fullWidthKa, "UTF-8"); > } > private String makeHalfWidthKa() throws UnsupportedEncodingException > { > return new String(halfWidthKa, "UTF-8"); > } > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org