How to replace comma with double quotes in Elasticsearch ingest pipeline?

Hi Experts,

Could you please assist me on how I can format the field value in Elasticsearch? I tried gsub under ingest pipeline , but it is not working as expected.


"gsub": {
        "field": "destination",
        "pattern": ",",
        "replacement": "\",\""

Actual field value /input to ingest pipeline

"destination" : ","

Field value inserted into elastic document using above code

"destination" : """",""""

Desire output

"destination" : "",""

Note : I also tried pattern_replace analyzer but no luck

Thanks and regards,

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