code: public static Query regex(String field,
                                String pattern,
                                boolean caseInsensitive,
                                boolean extended,
                                boolean multiline,
                                boolean dotall) {
          Query q = new Query(false);
          q.add("field", field).add("regex", pattern).
                  add("caseInsensitive", caseInsensitive).
                  add("extended", extended).
                  add("multiline", multiline).
                  add("dotall", dotall);
          return q;
      }
docs: <pre>
  { field: <field>, regex: <pattern>, ... }
  </pre>