You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Steven Bower <sm...@alcyon.net> on 2013/05/22 20:31:00 UTC
Numeric Multi-Valued Doc Values
What is the proper way to convert the value coming from SortedSetDocValues
for a numeric field (Int/Long/Float/Double) to their actual numeric
values... Basically I can get the ByteRef filled in with lookupOrd(...) but
what is the proper way to take the contents of the BytesRef and get the
int/long/etc.. value back from it?
thanks,
steve
Re: Numeric Multi-Valued Doc Values
Posted by "David Smiley (@MITRE.org)" <DS...@mitre.org>.
That's a schema issue. Lucene doesn't really have one so there isn't a
definitive answer there. For Solr, this ideally should be cleaner but it
isn't, last I checked a month ago. You could poke around the TrieField code
but in the end you will probably end up making assumptions on your code
being consistent with what TrieField is doing :-/ Perhaps we need a new
JIRA issue to add an indexedToObject(BytesRef):Object method to FieldType.
The default impl could call indexedToReadable() and return a String.
~ David
Steven Bower wrote
> What is the proper way to convert the value coming from SortedSetDocValues
> for a numeric field (Int/Long/Float/Double) to their actual numeric
> values... Basically I can get the ByteRef filled in with lookupOrd(...)
> but
> what is the proper way to take the contents of the BytesRef and get the
> int/long/etc.. value back from it?
>
> thanks,
>
> steve
-----
Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
--
View this message in context: http://lucene.472066.n3.nabble.com/Numeric-Multi-Valued-Doc-Values-tp4065423p4066190.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Numeric Multi-Valued Doc Values
Posted by "David Smiley (@MITRE.org)" <DS...@mitre.org>.
-----
Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
--
View this message in context: http://lucene.472066.n3.nabble.com/Numeric-Multi-Valued-Doc-Values-tp4065423p4066189.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org