Hi, I have an index with a lot of fields. I am trying to create a scripted field that will do some string manipulation on another field, but when I try to access it - I keep getting null
What I've noticed is that if I try to access integers everything works perfectly, but when I try to access any text field, it returns null
For example, taking these fields into account:
if I do:
emit(doc['run_info.duration'].value.toString());
everything works great
but if I do:
emit(doc['run_info.test'].value.toString());
(with or without the toString()), it's empty. and that's true to all text vs integers.
I tried copying the object JSON from "discover" and use it in the Painless debugger, but it all worked there, so I have no clue where to go next
Any idea what I'm doing wrong?