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

Robert Muir commented on LUCENE-7179:
-------------------------------------

When I say rounding issues, I mean the direction the users value will "go" in 
quantized space. Today GeoPoint truncates with a (long) cast, which goes in the 
direction of zero. Because of the subtraction it does, it mostly works (simply 
because supposedly numbers are always positive), but its buggy for some double 
values: I tried to port LatLonPoints "rounds down" test and it fails.

Having consistency with how we round things, having stability in the encoding, 
dealing with the maximum representable value, these are not fun things to do, 
but I think they are necessary for our own sanity at least. They can also make 
some things efficient, for example being able to do a bounding box query 
without having to do two-phase confirmation or actually any decoding at all 
(like LatLonPoint).

If we are gonna have this quantization in lucene, then we need to make it sane, 
test the hell out of it, and then take advantage of it too for faster queries / 
simpler processing in integer space, rather than it just being a constant pain. 
Otherwise I don't think we should do quantization!

> GeoPoint and LatLonPoint test data should quantize once
> -------------------------------------------------------
>
>                 Key: LUCENE-7179
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7179
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Nicholas Knize
>         Attachments: LUCENE-7179.patch
>
>
> {{LatLonPoint}} and {{GeoPointField}} tests pre quantizes test data to ensure 
> consistency with indexed (encoded) data. The pre quantized data then becomes 
> indexed, undergoing another quantization. To guarantee numerical stability 
> this should be changed such that the test data is quantized after indexing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to