How to use the debug parameter in the search method of the SearchClient class in the module azure.search.documents.aio._search_client_async.py #38960
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Search
Question
In the official documentation [[1]] regarding the debug parameter for performing index searches using the search method of the SearchClient class in the azure.search.documents.aio._search_client_async.py module of the azure-search-documents library (version 11.6.0b8), it is stated as follows:
Enables a debugging tool that can be used to further explore your Semantic search results. Known values are: "disabled", "speller", "semantic", and "all".
How can I obtain debug information from this debugging tool as an object?
What I Tried
I inferred that setting the debug parameter to a value other than "disabled" would result in the debug information being included in the return value of the search method.
Therefore, I set debug="all" as shown in the [code] and executed the search method, then checked the keys of the returned object of the type AsyncSearchItemPaged. The keys contained in the object are as follows ([output]), and there was no change before and after adding the debug parameter. The key related to the debug information (ex: @search.documentDebugInfo) was not present.
[code]
[output]
On the other hand, when checking the JSON data of the API response after executing this, I confirmed the presence of debug information such as "@search.documentDebugInfo".
Why is the debug information that exists in the API response not available as the return value of the search method?
[[1]]: https://learn.microsoft.com/en-us/python/api/azure-search-documents/azure.search.documents.searchclient?view=azure-python-preview
The text was updated successfully, but these errors were encountered: