def add_documents(self, documents):
result, errors = [], []<EOL>for document in documents:<EOL><INDENT>try:<EOL><INDENT>result.append(self.add_document(document))<EOL><DEDENT>except RuntimeError as exc:<EOL><INDENT>errors.append((document, exc))<EOL><DEDENT><DEDENT>return result, errors<EOL>
Adds more than one document using the same API call

Returns two lists: the first one contains the successfully uploaded
documents, and the second one tuples with documents that failed to be
uploaded and the exceptions raised.