[ https://issues.apache.org/jira/browse/LUCENE-7186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241588#comment-15241588 ]
Michael McCandless commented on LUCENE-7186: -------------------------------------------- Instead of: {noformat} private static final long TRANSLATE = (0L | Integer.MAX_VALUE) + 1; {noformat} can we do: {noformat} private static final long TRANSLATE = 1L << 31; {noformat} Is that the same thing? Also, why do we need TRANSLATE? Can we maybe name it more descriptively, or put a comment, or something? Maybe it's trying to accomplish the same thing as {{NumericUtils.intToSortableBytes}}, where it xors the sign bit, so negatives sort first? Maybe we should also use xor here? Instead of: {noformat} 0L | lonEnc {noformat} can't we just do: {noformat} lonEnc {noformat} ? Instead of: {noformat} // test within the range if ((encoded ^ 0xFFFFFFFFFFFFFFFFL) != 0) { {noformat} can we do: {noformat} // test within the range if (encoded != 0xFFFFFFFFFFFFFFFFL) { {noformat} ? Can we {{checkLatitude}} and {{checkLongitude}} in {{mortonEncode/Ceil}}? > Add numerically stable morton encoding to GeoEncodingUtils > ---------------------------------------------------------- > > Key: LUCENE-7186 > URL: https://issues.apache.org/jira/browse/LUCENE-7186 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Nicholas Knize > Attachments: LUCENE-7186.patch, LUCENE-7186.patch, LUCENE-7186.patch > > > This is the follow on to LUCENE-7184. It adds a numerically stable morton > encoding method to {{o.a.l.geo.GeoEncodingUtils}} that can be reused by > {{GeoPointField}} and a new {{GeoPointField}} based on {{Point}} encoding. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org