code: int indexOf(ResourcePath key) {
      QueryDocumentSnapshot document = keyIndex.get(key);
      if (document == null) {
        return -1;
      }
      return sortedSet.indexOf(document);
    }
docs: Returns the index of the provided key in the document set, or -1 if the document key is not
  present in the set;