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.

code

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

Actual field value /input to ingest pipeline

"destination" : "Test01@gamil.com,Test02@gamil.com"

Field value inserted into elastic document using above code

"destination" : """Test01@gamil.com","Test02@gamil.com"""

Desire output

"destination" : "Test01@gamil.com","Test02@gamil.com"

Note : I also tried pattern_replace analyzer but no luck

Thanks and regards,
Nivedita

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