def __doc_cmp(self, other):
        if other is None:
            return -1
        if self.is_new and other.is_new:
            return 0
        if self.__docid < other.__docid:
            return -1
        elif self.__docid == other.__docid:
            return 0
        else:
            return 1