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 946889687 for ; Sun, 11 Mar 2012 18:43:01 +0000 (UTC) Received: (qmail 75938 invoked by uid 500); 11 Mar 2012 18:43:00 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 75483 invoked by uid 500); 11 Mar 2012 18:42:58 -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 75457 invoked by uid 99); 11 Mar 2012 18:42:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2012 18:42:57 +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; Sun, 11 Mar 2012 18:42:57 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2B6E71A777 for ; Sun, 11 Mar 2012 18:42:37 +0000 (UTC) Date: Sun, 11 Mar 2012 18:42:37 +0000 (UTC) From: "Simon Willnauer (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <340189793.249.1331491357179.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1000341975.49286.1331484846160.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3862) DocValues getInt() returns long, getFloat() returns double 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-3862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227193#comment-13227193 ] Simon Willnauer commented on LUCENE-3862: ----------------------------------------- I should have been more specific. The reason why I did it that way is that you always have to explicitly downcast if you are sure you are not loosing any precision. If you offer a getShort somebody could accidentally downcast its 64 bit values into a 16 bit values without realizing. However, if it allows us to make similarities generic we need to rething that maybe. I kind of like the semantics we have right now ie. you get full 64 bit values no matter what you have encoded. > DocValues getInt() returns long, getFloat() returns double > ---------------------------------------------------------- > > Key: LUCENE-3862 > URL: https://issues.apache.org/jira/browse/LUCENE-3862 > Project: Lucene - Java > Issue Type: Improvement > Affects Versions: 4.0 > Reporter: Robert Muir > > I think this is a bit confusing: especially for the case of something like norms > where its really an 8 bit byte, a long is confusing. > i think we should have the usual getFloat/getDouble/getInt/getShort/getByte instead? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa 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