I just started playing with scripted fields in Kibana4 Beta3.
I'm looking for guidance on how to do type conversions with the new
scripted fields feature. Specifically, I have some ES fields that I've
typed as "ip" to (obviously) store IPv4 addresses. I'd line to convert
these to strings when creating my scripted field. Since 1) I didn't know
anything about Groovy until yesterday, and 2) Groovy doesn't appear to have
a native IP type, I'm at a loss as to how to approach this. Anybody know?
Well, I figured out that I can use doc['field_name'].value.toString(), but
that returns the integer version of the IP address as a string rather than
the dotted decimal version. I see some discussion of this problem in the ES
Github issues, but I can't tell if there's a solution.
On Wednesday, December 17, 2014 7:56:31 PM UTC-7, Jay Swan wrote:
I just started playing with scripted fields in Kibana4 Beta3.
I'm looking for guidance on how to do type conversions with the new
scripted fields feature. Specifically, I have some ES fields that I've
typed as "ip" to (obviously) store IPv4 addresses. I'd line to convert
these to strings when creating my scripted field. Since 1) I didn't know
anything about Groovy until yesterday, and 2) Groovy doesn't appear to have
a native IP type, I'm at a loss as to how to approach this. Anybody know?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.