Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 65252 invoked from network); 28 Mar 2010 15:05:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Mar 2010 15:05:51 -0000 Received: (qmail 58053 invoked by uid 500); 28 Mar 2010 15:05:50 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 57986 invoked by uid 500); 28 Mar 2010 15:05:50 -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 57979 invoked by uid 99); 28 Mar 2010 15:05:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Mar 2010 15:05:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Mar 2010 15:05:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 22B3D234C1EF for ; Sun, 28 Mar 2010 15:05:27 +0000 (UTC) Message-ID: <3682627.535381269788727126.JavaMail.jira@brutus.apache.org> Date: Sun, 28 Mar 2010 15:05:27 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-2354) Convert NumericUtils and NumericTokenStream to use BytesRef instead of Strings/char[] In-Reply-To: <502294381.531051269730527132.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Uwe Schindler updated LUCENE-2354: ---------------------------------- Attachment: LUCENE-2354.patch Here a first preview patch. NumericUtils still contains lots of unused String-based methods, I think we should remove them, the class is expert-only and also experimental. Backwards compatibility is broken even with those backwards layers (as the split functions were changed to use BytesRefs. Also these backwards methods are simply slow now (as the byte[] is copied to char[] and vice-versa). The new NumericTokenStream now uses a special NumericTermAttribute, so possibly Filters coming later have access to shift value and so on. This attribute also implements the TermToBytesRefAttribute for the indexer. Please note: This attribute is a hack and does not support copyTo/clone/...., so you cannot put away tokens (which is not needed), but its still possible to add further attributes to numeric tokens (which is why the attribute is there). The NumericTokenStream backwards test was removed, because the new stream does no longer contain a TermAttribute, so the test always fails. TODO: A better inline-hashCode generation for the numeric-to-BytesRef transformation > Convert NumericUtils and NumericTokenStream to use BytesRef instead of Strings/char[] > ------------------------------------------------------------------------------------- > > Key: LUCENE-2354 > URL: https://issues.apache.org/jira/browse/LUCENE-2354 > Project: Lucene - Java > Issue Type: Improvement > Affects Versions: Flex Branch > Reporter: Uwe Schindler > Assignee: Uwe Schindler > Fix For: Flex Branch > > Attachments: LUCENE-2354.patch > > > After LUCENE-2302, we should use TermToBytesRefAttribute to index using NumericTokenStream. This also should convert the whole NumericUtils to use BytesRef when converting numerics. -- 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: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org