-
Notifications
You must be signed in to change notification settings - Fork 689
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
MB-58388: Use custom datetime parsers in date range facet queries #1878
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abhinavdangeti
requested changes
Sep 7, 2023
abhinavdangeti
approved these changes
Sep 7, 2023
CascadingRadium
added a commit
that referenced
this pull request
Sep 13, 2023
) Related to Date range facet queries: - The "start" and "end" fields of the Facet Result struct are now formatted with the layout that successfully parsed them in the Facet Request struct. Earlier we always used RFC3339Nano by default which led to disparity between the corresponding fields in the facet request and result. Ex - Facet Request Date Range: { start : "2014-09-10" end : "2015-08-11" } Previously the Facet result had { start : "2014-09-10T00:00:00Z" end : "2015-08-11T00:00:00Z" Count: 100 } Now it has { start : "2014-09-10" end : "2015-08-11" Count: 100 } - Allow a custom date time parser to be added to the date range struct of a facet request, that will override the default date time parser (dateTimeOptional) while parsing the start and end date strings. - Add error message when the date time parser fails to parse the date string. Earlier if the date time parser failed to parse the start and end strings of the date range in the facet request, no error was thrown and the facet request would be for start and end being equal to 0 time, so facet result was always nil. - Fix marshalling error for dateRangeQuery struct. If the query had no end / endString, which is the case when upper bound is unspecified, the marshalled JSON always had the 0 time (time.Time{}) as the value for end, now it is omitted from the marshalled JSON.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira
MB-58388
Description
Related to Date range facet queries:
The "start" and "end" fields of the Facet Result struct are now formatted with the layout that successfully parsed them in the Facet Request struct. Earlier we always used RFC3339Nano by default which led to disparity between the corresponding fields in the facet request and result.
Ex - Facet Request Date Range:
Previously the Facet result had
Now it has