Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sdk/search/azure-search-documents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
- `azure.search.documents.indexes.models.RankingOrder`
- `azure.search.documents.indexes.models.SearchIndexPermissionFilterOption`

### Bugs Fixed

- Fixed the issue batching in upload_documents() did not work. #40157

### Other Changes

- Updated the API version to "2025-05-01-preview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ def _index_documents_actions(self, actions: List[IndexAction], **kwargs: Any) ->
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
batch = IndexBatch(actions=actions)
try:
batch_response = self._client.documents.index(batch=batch, **kwargs)
batch_response = self._client.documents.index(batch=batch, error_map=error_map, **kwargs)
return cast(List[IndexingResult], batch_response.results)
except RequestEntityTooLargeError:
if len(actions) == 1:
Expand All @@ -718,7 +718,7 @@ def _index_documents_actions(self, actions: List[IndexAction], **kwargs: Any) ->
else:
result_first_half = []
batch_response_second_half = self._index_documents_actions(
actions=actions[pos:], error_map=error_map, **kwargs
actions=actions[pos:], **kwargs
)
if batch_response_second_half:
result_second_half = batch_response_second_half
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def _index_documents_actions(self, actions: List[IndexAction], **kwargs) -> List
if remaining < 0:
raise ServiceResponseTimeoutError("Service response time out") from ex
batch_response_first_half = self._index_documents_actions(
actions=actions[:pos], error_map=error_map, timeout=remaining, **kwargs
actions=actions[:pos], timeout=remaining, **kwargs
)
if len(batch_response_first_half) > 0:
result_first_half = batch_response_first_half
Expand All @@ -307,7 +307,7 @@ def _index_documents_actions(self, actions: List[IndexAction], **kwargs) -> List
if remaining < 0:
raise ServiceResponseTimeoutError("Service response time out") from ex
batch_response_second_half = self._index_documents_actions(
actions=actions[pos:], error_map=error_map, timeout=remaining, **kwargs
actions=actions[pos:], timeout=remaining, **kwargs
)
if len(batch_response_second_half) > 0:
result_second_half = batch_response_second_half
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ async def _index_documents_actions(self, actions: List[IndexAction], **kwargs: A
if remaining < 0:
raise ServiceResponseTimeoutError("Service response time out") from ex
batch_response_first_half = await self._index_documents_actions(
actions=actions[:pos], error_map=error_map, **kwargs
actions=actions[:pos], timeout=remaining, **kwargs
)
if len(batch_response_first_half) > 0:
result_first_half = batch_response_first_half
Expand All @@ -310,7 +310,7 @@ async def _index_documents_actions(self, actions: List[IndexAction], **kwargs: A
if remaining < 0:
raise ServiceResponseTimeoutError("Service response time out") from ex
batch_response_second_half = await self._index_documents_actions(
actions=actions[pos:], error_map=error_map, **kwargs
actions=actions[pos:], timeout=remaining, **kwargs
)
if len(batch_response_second_half) > 0:
result_second_half = batch_response_second_half
Expand Down