Hi, I'm trying to escape my document index PUT requests in Java, and having a hell of a time. Things I've tried:
Apache commons-lang EscapeUtils.escapeJavascript
Lucene QueryParser.escape
Neither of these work, the first escapes " ' " to " ' " and Elasticsearch is not happy, while the second does not escape new lines. I'm not very interested in a JSON library because its massive overkill, I'm only making one or two very particular type of query ever over the course of my application.
Please, help.