I'm having a field called userid
(analyzed and the datatype
is text
) and all it's value pretend to be as follows:
sometext@something.super
newtext@something.super
So what I need is, to trim the above value so that I can only get the text in front of @something.super
.
I tried writing a painless
script in order to check whether the value contains the @something.super
, if so then assign the value to an empty string but still no luck.
Is trimming possible for a string field in Kibana
? Or
Is it possible to trim the value in elasticsearch
itself if I'm to update the existing field?
Any help could be appreciated.