code: public static Projection array(String pattern,
                                     Integer from,
                                     Integer to,
                                     boolean include,
                                     Projection projection,
                                     Sort sort) {
          Projection p = new Projection(false);
          ArrayNode a = JsonNodeFactory.instance.arrayNode();
          a.add(JsonNodeFactory.instance.numberNode(from));
          if (to != null) {
              a.add(JsonNodeFactory.instance.numberNode(to));
          } else {
              a.add(JsonNodeFactory.instance.nullNode());
          }
          p.add("field", pattern).add("include", include).add("range", a);
          if (projection != null) {
              p.add("projection", projection.toJson());
          }
          if (sort != null) {
              p.add("sort", sort.toJson());
          }
          return p;
      }
docs: <pre>
  { field: <pattern>, include: <include>, range: [from,to], projection: <projection>, sort: <sort> }
  </pre>