Skip to content

Commit 9b6cd2a

Browse files
authored
Search fix debug info (#40187)
* Fix document debug info. * update changelog * update * update
1 parent c393dc0 commit 9b6cd2a

17 files changed

+22
-27
lines changed

sdk/search/azure-search-documents/CHANGELOG.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 11.6.0b11 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
3+
## 11.6.0b11 (2025-03-25)
84

95
### Bugs Fixed
106

11-
### Other Changes
7+
- Fixed the issue that could not deserialize `document_debug_info`. #40138
128

139
## 11.6.0b10 (2025-03-11)
1410

sdk/search/azure-search-documents/azure/search/documents/_generated/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66
# pylint: disable=wrong-import-position

sdk/search/azure-search-documents/azure/search/documents/_generated/_configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

sdk/search/azure-search-documents/azure/search/documents/_generated/_search_index_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

sdk/search/azure-search-documents/azure/search/documents/_generated/aio/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66
# pylint: disable=wrong-import-position

sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_search_index_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

sdk/search/azure-search-documents/azure/search/documents/_generated/aio/operations/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66
# pylint: disable=wrong-import-position

sdk/search/azure-search-documents/azure/search/documents/_generated/aio/operations/_documents_operations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=too-many-lines
22
# coding=utf-8
33
# --------------------------------------------------------------------------
4-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
4+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------
77
from io import IOBase

sdk/search/azure-search-documents/azure/search/documents/_generated/models/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66
# pylint: disable=wrong-import-position

sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models_py3.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=too-many-lines
22
# coding=utf-8
33
# --------------------------------------------------------------------------
4-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
4+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------
77

@@ -1807,7 +1807,7 @@ class SearchResult(_serialization.Model):
18071807
:vartype captions: list[~azure.search.documents.models.QueryCaptionResult]
18081808
:ivar document_debug_info: Contains debugging information that can be used to further explore
18091809
your search results.
1810-
:vartype document_debug_info: list[~azure.search.documents.models.DocumentDebugInfo]
1810+
:vartype document_debug_info: ~azure.search.documents.models.DocumentDebugInfo
18111811
"""
18121812

18131813
_validation = {
@@ -1824,7 +1824,7 @@ class SearchResult(_serialization.Model):
18241824
"reranker_score": {"key": "@search\\.rerankerScore", "type": "float"},
18251825
"highlights": {"key": "@search\\.highlights", "type": "{[str]}"},
18261826
"captions": {"key": "@search\\.captions", "type": "[QueryCaptionResult]"},
1827-
"document_debug_info": {"key": "@search\\.documentDebugInfo", "type": "[DocumentDebugInfo]"},
1827+
"document_debug_info": {"key": "@search\\.documentDebugInfo", "type": "DocumentDebugInfo"},
18281828
}
18291829

18301830
def __init__(self, *, additional_properties: Optional[Dict[str, Any]] = None, **kwargs: Any) -> None:
@@ -1839,7 +1839,7 @@ def __init__(self, *, additional_properties: Optional[Dict[str, Any]] = None, **
18391839
self.reranker_score: Optional[float] = None
18401840
self.highlights: Optional[Dict[str, List[str]]] = None
18411841
self.captions: Optional[List["_models.QueryCaptionResult"]] = None
1842-
self.document_debug_info: Optional[List["_models.DocumentDebugInfo"]] = None
1842+
self.document_debug_info: Optional["_models.DocumentDebugInfo"] = None
18431843

18441844

18451845
class VectorThreshold(_serialization.Model):

sdk/search/azure-search-documents/azure/search/documents/_generated/models/_search_index_client_enums.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

sdk/search/azure-search-documents/azure/search/documents/_generated/operations/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66
# pylint: disable=wrong-import-position

sdk/search/azure-search-documents/azure/search/documents/_generated/operations/_documents_operations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=too-many-lines
22
# coding=utf-8
33
# --------------------------------------------------------------------------
4-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.28.4)
4+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/python@6.30.0)
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------
77
from io import IOBase

sdk/search/azure-search-documents/azure/search/documents/_search_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -700,14 +700,14 @@ def _index_documents_actions(self, actions: List[IndexAction], **kwargs: Any) ->
700700
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
701701
batch = IndexBatch(actions=actions)
702702
try:
703-
batch_response = self._client.documents.index(batch=batch, error_map=error_map, **kwargs)
703+
batch_response = self._client.documents.index(batch=batch, **kwargs)
704704
return cast(List[IndexingResult], batch_response.results)
705705
except RequestEntityTooLargeError:
706706
if len(actions) == 1:
707707
raise
708708
pos = round(len(actions) / 2)
709709
batch_response_first_half = self._index_documents_actions(
710-
actions=actions[:pos], error_map=error_map, **kwargs
710+
actions=actions[:pos], **kwargs
711711
)
712712
if batch_response_first_half:
713713
result_first_half = batch_response_first_half

sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -704,14 +704,14 @@ async def _index_documents_actions(self, actions: List[IndexAction], **kwargs: A
704704
raise
705705
pos = round(len(actions) / 2)
706706
batch_response_first_half = await self._index_documents_actions(
707-
actions=actions[:pos], error_map=error_map, **kwargs
707+
actions=actions[:pos], **kwargs
708708
)
709709
if batch_response_first_half:
710710
result_first_half = batch_response_first_half
711711
else:
712712
result_first_half = []
713713
batch_response_second_half = await self._index_documents_actions(
714-
actions=actions[pos:], error_map=error_map, **kwargs
714+
actions=actions[pos:], **kwargs
715715
)
716716
if batch_response_second_half:
717717
result_second_half = batch_response_second_half

sdk/search/azure-search-documents/tests/test_search_client.py

-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ def test_index_documents(self, mock_index):
307307
client.index_documents(batch, extra="foo")
308308
assert mock_index.called
309309
assert mock_index.call_args[0] == ()
310-
assert len(mock_index.call_args[1]) == 4
311310
assert mock_index.call_args[1]["headers"] == client._headers
312311
assert mock_index.call_args[1]["extra"] == "foo"
313312

0 commit comments

Comments
 (0)