Adding support for unique indexes (ensure_index unique=True)