public static String queryWithEscapedArgs(String query, String... args) {
        Object[] sanitisedArgs = Arrays.stream(args)
            .parallel()
            .map(EsUtils::escape)
            .toArray();
        return replaceQMark(query, sanitisedArgs);
    }
An ES query with escaped arguments:
<p>
Use the SQL convention of ? (e.g. "foo": ?, "bar": ?).
<p>
A {@link Number} instance will be unquoted, all other types will be quoted.

@param query ES query
@param args the corresponding positional arguments {0} ... {n-1}
@return query with escaped variables substituted in
common/es/src/main/java/io/apiman/common/es/util/EsUtils.java