Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 73475 invoked from network); 2 Feb 2010 00:06:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 00:06:44 -0000 Received: (qmail 16285 invoked by uid 500); 2 Feb 2010 00:06:42 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 16194 invoked by uid 500); 2 Feb 2010 00:06:42 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 16112 invoked by uid 99); 2 Feb 2010 00:06:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 00:06:42 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [85.25.71.29] (HELO mail.troja.net) (85.25.71.29) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 00:06:31 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 8F9D845FA8A for ; Tue, 2 Feb 2010 01:06:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.troja.net Received: from mail.troja.net ([127.0.0.1]) by localhost (megaira.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2KktLsFbnF-M for ; Tue, 2 Feb 2010 01:06:00 +0100 (CET) Received: from VEGA (port-83-236-62-54.dynamic.qsc.de [83.236.62.54]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTPSA id 7FC7145FA89 for ; Tue, 2 Feb 2010 01:05:59 +0100 (CET) From: "Uwe Schindler" To: References: <1947495577.11061265067498690.JavaMail.jira@brutus.apache.org> <865231444.11841265069058869.JavaMail.jira@brutus.apache.org> In-Reply-To: <865231444.11841265069058869.JavaMail.jira@brutus.apache.org> Subject: RE: [jira] Updated: (LUCENE-2247) Add CharArrayMap to lucene and make CharAraySet an proxy on the keySet() of it Date: Tue, 2 Feb 2010 01:06:14 +0100 Message-ID: <000301caa39b$89a8cd40$9cfa67c0$@de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acqjm2TO66chUunxRvOxOL+fWWLQKQAABGvg Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org Sorry, JIRA was down and produced error 503, but did the work... so I = retried too often. ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de > -----Original Message----- > From: Uwe Schindler (JIRA) [mailto:jira@apache.org] > Sent: Tuesday, February 02, 2010 1:04 AM > To: java-dev@lucene.apache.org > Subject: [jira] Updated: (LUCENE-2247) Add CharArrayMap to lucene and > make CharAraySet an proxy on the keySet() of it >=20 >=20 > [ https://issues.apache.org/jira/browse/LUCENE- > = 2247?page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > ] >=20 > Uwe Schindler updated LUCENE-2247: > ---------------------------------- >=20 > Attachment: (was: LUCENE-2247.patch) >=20 > > Add CharArrayMap to lucene and make CharAraySet an proxy on the > keySet() of it > > = --------------------------------------------------------------------- > --------- > > > > Key: LUCENE-2247 > > URL: https://issues.apache.org/jira/browse/LUCENE- > 2247 > > Project: Lucene - Java > > Issue Type: Improvement > > Components: Analysis > > Reporter: Uwe Schindler > > Assignee: Uwe Schindler > > Fix For: 3.1 > > > > Attachments: LUCENE-2247.patch, LUCENE-2247.patch > > > > > > This patch adds a CharArrayMap to Lucene's analysis package as > compagnon of CharArraySet. It supports fast retrieval of char[] keys > like CharArraySet does. This is important for some stemmers and other > places in Lucene. > > Stemers generally use CharArrayMap, which has then > get(char[]) returning String. Strings are compact and can be easily > copied into termBuffer. A Map would be slow as the > termBuffer would be first converted to String, then looked up. The > return value as String is perfectly legal, as it can be copied easily > into termBuffer. > > This class borrows lots of code from Solr's pendant, but has > additional features and more consistent API according to CharArraySet. > The key is always , because as of CharArraySet, anything that has a > toString() representation can be used as key (of course with = overhead). > It also defines a unmodifiable map and correct iterators (returning = the > native char[]). > > CharArraySet was made consistent and now returns for > matchVersion>=3D3.1 also an iterator on char[]. CharArraySet's code = was > almost completely copied to CharArrayMap and removed in the Set. > CharArraySet is now a simple proxy on the keySet(). > > In future we can think of making > CharArraySet/CharArrayMap/CharArrayCollection an interface so the = whole > API would be more consistent to the Java collections API. But this > would be a backwards break. But it would be possible to use better = impl > instead of hashing (like prefix trees). >=20 > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org