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.


-Kevin

Reply via email to