-
Notifications
You must be signed in to change notification settings - Fork 49
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
[FEATURE] Serialize DateOnly as a date instead of serializing its properties individually #680
Comments
Thanks for reporting this @nalka0! Would you be interested in contributing a fix for this? It should just involve adding a |
@Xtansia Honnestly, I don't feel familiar enough with either OpenSearch nor this nuget package to feel like sending a pull request 😅 |
@nalka0 That's completely understandable and no problem :) |
I am going to attempt a PR for this one |
…nsearch-project#680 Signed-off-by: Joe Feser <[email protected]>
…project#680 Signed-off-by: Joe Feser <[email protected]>
* feat(): add .net6 and .net8 to core project and get it to compile #680 Signed-off-by: Joe Feser <[email protected]> * feat(): add support for DateOnly and TimeOnly from .net 6 #680 Signed-off-by: Joe Feser <[email protected]> * PR Comments Signed-off-by: Joe Feser <[email protected]> * PR Comments Signed-off-by: Joe Feser <[email protected]> * modified the added section of changelog.md Signed-off-by: Joe Feser <[email protected]> * Fix compilation/indentation error Signed-off-by: Thomas Farr <[email protected]> * Fix code conventions unit test Signed-off-by: Thomas Farr <[email protected]> * Fix remaining `#if`s Signed-off-by: Thomas Farr <[email protected]> * Fix changelog ordering Signed-off-by: Thomas Farr <[email protected]> * Fix CI errors Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Joe Feser <[email protected]> Signed-off-by: Thomas Farr <[email protected]> Co-authored-by: Thomas Farr <[email protected]>
…pensearch-project#734) * feat(): add .net6 and .net8 to core project and get it to compile opensearch-project#680 Signed-off-by: Joe Feser <[email protected]> * feat(): add support for DateOnly and TimeOnly from .net 6 opensearch-project#680 Signed-off-by: Joe Feser <[email protected]> * PR Comments Signed-off-by: Joe Feser <[email protected]> * PR Comments Signed-off-by: Joe Feser <[email protected]> * modified the added section of changelog.md Signed-off-by: Joe Feser <[email protected]> * Fix compilation/indentation error Signed-off-by: Thomas Farr <[email protected]> * Fix code conventions unit test Signed-off-by: Thomas Farr <[email protected]> * Fix remaining `#if`s Signed-off-by: Thomas Farr <[email protected]> * Fix changelog ordering Signed-off-by: Thomas Farr <[email protected]> * Fix CI errors Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Joe Feser <[email protected]> Signed-off-by: Thomas Farr <[email protected]> Co-authored-by: Thomas Farr <[email protected]> (cherry picked from commit f3bae74)
* feat(): add .net6 and .net8 to core project and get it to compile #680 Signed-off-by: Joe Feser <[email protected]> * feat(): add support for DateOnly and TimeOnly from .net 6 #680 Signed-off-by: Joe Feser <[email protected]> * PR Comments Signed-off-by: Joe Feser <[email protected]> * PR Comments Signed-off-by: Joe Feser <[email protected]> * modified the added section of changelog.md Signed-off-by: Joe Feser <[email protected]> * Fix compilation/indentation error Signed-off-by: Thomas Farr <[email protected]> * Fix code conventions unit test Signed-off-by: Thomas Farr <[email protected]> * Fix remaining `#if`s Signed-off-by: Thomas Farr <[email protected]> * Fix changelog ordering Signed-off-by: Thomas Farr <[email protected]> * Fix CI errors Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Joe Feser <[email protected]> Signed-off-by: Thomas Farr <[email protected]> Co-authored-by: Thomas Farr <[email protected]> (cherry picked from commit f3bae74) Co-authored-by: Joe Feser <[email protected]>
I guess this issue could be reopened (can't do it myself) based on the problems I described on the related PR #734 (comment) |
@nalka0 If you can reach out to me (see contact info), I can work with you to ensure everything works as expected. |
I'm sorry, what contact info are you talking about ? I don't see any 😅 |
Sorry I realized I took my email off my profile. @nalka0 joseph dot Feser at the google email service. |
Is your feature request related to a problem?
DateOnly properties are treated as any other complex type and its properties are serialised individually. It prevents using features like date ranges when searching.
What solution would you like?
DateOnly properties be treated as DateTime properties, except maybe they'd use a different format (like
yyyy-mm-dd
)What alternatives have you considered?
Customizing the serialization behavior myself, but I didn't find a way to do so. Also tried applying [DateAttribute] to my property but didn't seem to change anything
Do you have any additional context?
Currently DateOnly properties are serialized this way :
PS :
TimeOnly
may have the same kind of issuesThe text was updated successfully, but these errors were encountered: