code: public static String queryWithEscapedArgs(String query, String... args) {
          Object[] sanitisedArgs = Arrays.stream(args)
              .parallel()
              .map(ESUtils::escape)
              .toArray();
          return replaceQMark(query, sanitisedArgs);
      }
docs: 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