Mailing List Archive

DoubleLeafComparator Question
Hello everyone,
In the DoubleLeafComparator::getValueForDoc
<https://github.com/apache/lucene/blob/8340b01c3cc229f33584ce2178b07b8984daa6a9/lucene/core/src/java/org/apache/lucene/search/comparators/DoubleComparator.java#L68>
when Lucene is converting back to the double from the long representation,
I see that it is using Double::longBitsToDouble. My question is why does
Lucene use that and not NumericUtils::sortableLongToDouble
<https://github.com/apache/lucene/blob/8340b01c3cc229f33584ce2178b07b8984daa6a9/lucene/core/src/java/org/apache/lucene/util/NumericUtils.java#L56>?
I am assuming that users would use NumericUtils::doubleToSortableLong
during indexing so shouldn't Lucene use NumericUtils::sortableLongToDouble
when converting back to a double? Thanks in advance.