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

Uwe Schindler commented on LUCENE-7063:
---------------------------------------

Thanks! I was about to mention this here, too. TestNumericUtils was written 
like 7 years ago (without randomization), but the tests are good. They check 
that compareto of double/float and the sortable long/int behave identical, 
especially with INFINITY and NAN. We should really test this. We can also 
randomize the tests now: Create a huge number of floats/doubles and sort them. 
After that convert every value from sorted random array to a sortableInteger 
and check that they are also increasing. The NaN and similar special value 
tests should of course stay as is.

> NumericUtils vs LegacyNumericUtils chaos with 6.0
> -------------------------------------------------
>
>                 Key: LUCENE-7063
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7063
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-7063.patch
>
>
> Old prefix-coded terms helper functions are still available in 
> LegacyNumericUtils, but its confusing when upgrading because NumericUtils and 
> LegacyNumericUtils have overlaps in the APIs.
> One issue is they share some exact methods that are completely unrelated to 
> this encoding (e.g. floatToSortableInt). The method is just duplication and 
> worst, most lucene code is still calling it from LegacyNumericUtils, even 
> stuff like faceting code using it with docvalues.
> Another issue is the new NumericUtils methods (which use full byte range) 
> have vague names, no javadocs, expose helper methods as public unnecessarily, 
> and cause general confusion.
> I don't think NumericUtils and LegacyNumericUtils should overlap. 
> LegacyNumericUtils should only contain legacy stuff!



--
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