0

index()。remove(..)を実行すると、ステータスコードが返されませんか?ただし、index()。add(..)のステータスコードが返されます。remove(..)が失敗した場合、再試行する必要はありませんか?

4

1 に答える 1

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."
于 2012-05-25T05:47:04.827 に答える