lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Osborn, Kevin" <>
Subject Convert BytesRef to long in Solr 6.2
Date Thu, 29 Sep 2016 18:23:25 GMT
I have the following code inside a Solr post filter.

SortedDocValues docValues = DocValues.getSortedSet(context.reader, "my_field");

long x = LegacyNumericUtils.prefixCodedToLong(docValues.lookupOrd(b))

I am in the process of upgrading from Solr 5.5 to 6.2, so I changed NumericUtils to LegacyNumericUtils.

Basically, I am taking the BytesRef from a field and extracting the long from it.

However, LegacyNumericUtils is the deprecated form of NumericUtils. It says that I should
use the PointValues class instead. However, unless I am missing something, it does not seem
to support converting BytesRef to long/int/etc.

Is there a better method to do this? I would rather not deprecated code.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message