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 00B5A2AA9 for ; Thu, 5 May 2011 16:21:46 +0000 (UTC) Received: (qmail 74586 invoked by uid 500); 5 May 2011 16:21:44 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 74538 invoked by uid 500); 5 May 2011 16:21:44 -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 74531 invoked by uid 99); 5 May 2011 16:21:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 16:21:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 16:21:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 35EE5C2FDB for ; Thu, 5 May 2011 16:21:03 +0000 (UTC) Date: Thu, 5 May 2011 16:21:03 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Message-ID: <1570720063.25097.1304612463217.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1939176526.19277.1304444463325.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3065) NumericField should be stored in binary format in index (matching Solr's format) 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-3065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029412#comment-13029412 ] Uwe Schindler commented on LUCENE-3065: --------------------------------------- Patch against 3.x. I moved the to/from byte[] methods from Solr's TrieField into Lucene's NumericUtils, and fixed FieldsWriter/Reader to use free bits in the field's flags to know if the field is Numeric, and which type. I added a random test case to verify we now get the right NumericField back, when we stored NumericField during indexing. Old indices are handled fine (you'll get a String-ified Field back like you did before). Spookily, nothing failed in Solr... I assume there's somewhere in Solr that must now be fixed to handle the fact that a field can come back as NumericField? Anyone know where...?) > NumericField should be stored in binary format in index (matching Solr's format) > -------------------------------------------------------------------------------- > > Key: LUCENE-3065 > URL: https://issues.apache.org/jira/browse/LUCENE-3065 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Michael McCandless > Assignee: Uwe Schindler > Priority: Minor > Fix For: 3.2, 4.0 > > Attachments: LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch > > > (Spinoff of LUCENE-3001) > Today when writing stored fields we don't record that the field was a NumericField, and so at IndexReader time you get back an "ordinary" Field and your number has turned into a string. See https://issues.apache.org/jira/browse/LUCENE-1701?focusedCommentId=12721972&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12721972 > We have spare bits already in stored fields, so, we should use one to record that the field is numeric, and then encode the numeric field in Solr's more-compact binary format. > A nice side-effect is we fix the long standing issue that you don't get a NumericField back when loading your document. -- This message is automatically generated by JIRA. 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