Re: Solr UninvertingReader getNumericDocValues doesn't seem to work for fields that are not stored or indexed

2016-01-20 Thread plbarrios
Joel,

Thank you for the reply!

This approach solved my problem.

Now should I be concerned about the 32 bits that are lost in converting the
long to an int? Also, is this the intended approach when using
NumericDocValues?



--
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-tp4251881p4252035.html
Sent from the Solr - User mailing list archive at Nabble.com.


Solr UninvertingReader getNumericDocValues doesn't seem to work for fields that are not stored or indexed

2016-01-19 Thread plbarrios
I have a defined field in my schema.xml that is a simple float that is not
stored nor indexed as follows:

**

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

  



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