I have a defined field in my schema.xml that is a simple float that is not
stored nor indexed as follows:

*<field name="boost" type="float" docValues="true" indexed="false"
stored="false" required="false" multiValued="false"/>*

In Solr 4 I was able to get the float value the following way:

*FieldCache.Floats docBoosts =
FieldCache.DEFAULT.getFloats(context.reader(), FieldName.Boost, false);
float boost = docBoosts == null ? 1.0f : docBoosts.get(doc)
return boost == 0.0f ? 1.0f : boost*

In Solr 5 I tried to do this instead of FieldCache:

*NumericDocValues docBoosts = DocValues.getNumeric(context.reader(), 
FieldName.Boost)*

However this approach didn't work, as the UninvertingReader.getType fails to
detect that this field is a float an instead provides me with a
NumericDocValue from Lucene54DocValuesProducer that changes the value
of*0.95f* to *1.06451437E9*.

Has anyone found a similar issue, and if so could you tell me what am I
missing?

I have posted this to stackoverflow as well to the following link.

http://stackoverflow.com/questions/34888150/solr-uninvertingreader-getnumericdocvalues-doesnt-seem-to-work-for-fields-that
<http://stackoverflow.com/questions/34888150/solr-uninvertingreader-getnumericdocvalues-doesnt-seem-to-work-for-fields-that>
  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-UninvertingReader-getNumericDocValues-doesn-t-seem-to-work-for-fields-that-are-not-stored-or-ind-tp4251881.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to