[BUG] Azure.Search.Documents v11.1.1 search sdk Deserialize a facets string 'looks like a date' into datetime #16412
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
Describe the bug
We installed Azure.Search.Documents v11.1.1. When search result's facets returned contains a string like date time (i.e., "9.6",or "9-6") it will be parsed into a date-time instead of a string.
Expected behavior
What is the expected behavior?
The returned facets should return string value as it is.
Actual behavior (include Exception or Stack Trace)
What is the actual behavior?
The returned facets value returned as a date time
To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
Environment:
Azure.Search.Documents v11.1.1
dotnet --info
output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]IIS web project with .NET 4.7.2
See the attachment for what is returned from api v.s. what return from sdk. The 8th item's value is "9-6" and is parsed into a date time.
PS. Azure.Search.Documents v11.1.1 internally use system.text.json for facets de-serializing. But we do not have access to the default options and seems nothing could be done to change this behavior.
The text was updated successfully, but these errors were encountered: