You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Michael McCandless (Jira)" <ji...@apache.org> on 2020/06/29 14:12:00 UTC

[jira] [Commented] (LUCENE-9416) Fix CheckIndex to print norms as unsigned integers

    [ https://issues.apache.org/jira/browse/LUCENE-9416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17147816#comment-17147816 ] 

Michael McCandless commented on LUCENE-9416:
--------------------------------------------

Yeah this is indeed tricky.  By default, norms are mapped to a single unsigned byte (0 .. 255), I think.  Yet, the API, and a custom {{Codec,}} could indeed choose to use higher precision and use the full {{long}} space (well, a java signed long, so maximum positive value of {{Long.MAX_VALUE}}) allowed by the API.

From that thread, it looks like {{-1}} is supposed to be the largest unsigned value.  So maybe we should fix {{CheckIndex}}'s debug output to interpret the number as an unsigned Long?  Maybe using {{Long.toUnsignedString}}?

> Fix CheckIndex to print norms as unsigned integers
> --------------------------------------------------
>
>                 Key: LUCENE-9416
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9416
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>            Reporter: Mohammad Sadiq
>            Priority: Minor
>
> In the [discussion on "CheckIndex complaining about -1 for norms value" in the java-user list|http://markmail.org/message/gcwdhasblsyovwc2], it was identified that we should "fix CheckIndex to print norms as unsigned integers".
> I'd like to take a stab at this.
> I'm trying to understand the problem and from what I gather, while norms are `byte`s, the API exposes them as `long` values. While printing the error message, we want it to print a zero instead of -1?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org