执行index()时没有返回状态码.remove(..)?但是index()。add(..)的状态代码返回。如果删除(..)失败,则无需重试?
答案 0 :(得分:1)
Index.remove()
应该抛出异常。具体而言(来自remove
方法文档):
"Raises:
RemoveError: If one or more documents failed to remove or
number removed did not match requested.
ValueError: If document_ids is not a string or iterable of valid document
identifiers or number of document ids is larger than
_MAXIMUM_DOCS_PER_REQUEST."