I have a field for which I would need to replace 
 values by CrLf.
I tried the following but \r\n is not recognized (unexpected character [\"\\r]. The only valid escape sequences in strings starting with [\"] are [\\\\] and [\\\"].).
The only way I found to get somewhere similar is by literally creating a new line in my script but even then, it create a \n value instead of \r\n (or at least it seems according to further manipulations).
the replace function returns a value, but does not do an in-place replacement. So you need to assign a variable to the result (likely ctx.group.MyField = ...)
You are right, I did modify my code in that sens but forgot to change it here. But the problem is still with the string escaping in an ingest painless script.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.