code: public static QueryBuilder parse(String raw, boolean isQuery) throws IOException {
          if (raw.startsWith("?")) {
              return parseURI(raw.substring(1));
          } else if (raw.startsWith("{")) {
              return new RawQueryBuilder(raw, isQuery);
  
          } else {
              throw new IllegalArgumentException("Failed to parse query: " + raw);
          }
      }
docs: Builds a QueryBuilder from the given string
  @param raw a JSON string or an URI search
  @param isQuery true if the string is a query otherwise the string is considered as
  a filter (only relevant for elasticsearch version prior to 2.x).
  @return
  @throws IOException