I have below 3 fields in elasticsearch.
I want to connect create a new script fields with connecting the values of 2 fields, and the type of new field should be text&keyword as well.
my script : doc['companyId'].values + doc['userId'].values + doc['actionType'].values.
But there is error in Kibana UI. How should I get rid of it if + is not supported, what is the correct syntax??
class_cast_exception: Cannot apply [+] operation to types [org.elasticsearch.index.fielddata.ScriptDocValues.Strings] and [org.elasticsearch.index.fielddata.ScriptDocValues.Strings].
I guess it should look like this instead doc['companyId.keyword'].value + doc['userId.keyword'].value + doc['actionType.keyword'].value? IIRC the field should be searchable and aggregatable to use it in a scripted field, so you can't use text.