Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Azure.Search.Documents v11.1.1 search sdk Deserialize a facets string 'looks like a date' into datetime #16412

Closed
yhuangf opened this issue Oct 29, 2020 · 3 comments
Assignees
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

Comments

@yhuangf
Copy link

yhuangf commented Oct 29, 2020

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:

  • Name and version of the Library package used: [e.g. Azure.Storage.Blobs 12.2.0]

Azure.Search.Documents v11.1.1

  • Hosting platform or OS and .NET runtime version (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

  • IDE and version : [e.g. Visual Studio 16.3]

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.

image
image

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Oct 29, 2020
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Search labels Oct 29, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Oct 29, 2020
@jsquire
Copy link
Member

jsquire commented Oct 29, 2020

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@brjohnstmsft
Copy link
Member

@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?

@tg-msft
Copy link
Member

tg-msft commented Nov 6, 2020

Thanks for reporting this. A fix should be in by next week's release.

tg-msft added a commit to tg-msft/azure-sdk-for-net that referenced this issue Nov 7, 2020
@tg-msft tg-msft closed this as completed in cf73109 Nov 7, 2020
annelo-msft pushed a commit to annelo-msft/azure-sdk-for-net that referenced this issue Feb 17, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

4 participants