I'm upgrading to ES 0.90 and I have some native scripts written in Java
(currently using 0.19.8)
The DocLookup in AbstractFloatSearchScript (accessed through doc())
does not have the numeric(string) method anymore, it was used like this:
long myValue = doc().numeric("my_number_value*").getLongValue();*
Now DocLookup implements the Map interface. So instead of
doc().numeric("my_number_field"), I should do doc().get("my_number_field").
Looking at the source code get() returns a ScriptDocValues (although
the signature only says Object).
What should I do to get the long value?
I'm gonna try:
NumericLong n = (NumericLong)doc().get("my_number_field");
long v = n.getValue();
Is that the correct way of doing this?
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.