code: public static final IndexReference indexRef(String indexName, IndexType type) {
          if (type == null) {
              return new IndexReference("`" + indexName + "`");
          }
          return new IndexReference("`" + indexName + "` USING " + type.toString());
      }
docs: Constructs an {@link IndexReference} given an index name (which will be escaped) and an explicit
  {@link IndexType} to use in a USING clause.