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)
1.
2.
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.


Thank you for your feedback. Tagging and routing to the team member best able to assist.
@tg-msft In the Track 1 SDK, I recall we had helper methods with a type parameter to convert facets to the desired type. Is there an equivalent in Track 2? Or is this a deeper problem, where STJ is making too many assumptions about the type of string data?
Thanks for reporting this. A fix should be in by next week's release.