Pipeline regex not able to access object index

when doing this simple regex:
let initialRequest = regex(“initialRequest:”(.*?)",request", to_string($message.message));
set_field(“initialRequest”,initialRequest[“0”]);
log is not written seems having something wrong in it, (don’t have access to the server logs)

  • is there any syntax error here ?

when I remove the [“0”] having set_field(“initialRequest”,initialRequest);
I get a new field but the escape characters are not removed from the string after regex is applied:
{“0”:"{ \“valRequestId\”:\“FOO-FOO758990105045\”, \“userId\”:\“123456\”, \“subscriptionId\”:\"\", \“authCode\”:\“624602\”}"}

  • can we remove the escape characters generated by the regex ?

what does this Indexer failures Error message means?
{“type”:“mapper_parsing_exception”,“reason”:“object mapping for [initialRequest] tried to parse field [initialRequest] as object, but found a concrete value”}

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.