You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ElasticSearch query runs the date filter before the aggregation, to restrict the data going into the aggregation step to those records between the dates.
datemin and datemax should be in ISO 8601 YYYY-MM-DD format
filtering should be inclusive (as in <= (less than or equal to) and >= (greater than or equal to) of the datemin and datemax.
if no datemax is specified, it should only filter the datemin
if no datemin is specified, it should only filter the datemax`
if neither datemin not datemax is specified, there should be no filtering.
Should also have basic error checking, if datemin or datemax is not specified as an ISO string. Should return a 400 error (bad request)
ElasticSearch passes the filtered data to the existing aggregation code.
Output format is unchanged, just with fewer dates.
Expected outcome
Should decrease API call query times by only aggregating a subset of the data, rather than all the data.
Should lower the amount of data passed to the front-end, since only the relevant dates are passed.
For longitudinal queries, add a parameter
datemin
anddatemax
(feel free to change the names) to filter queries based on dates.API handlers / routes covered:
Expected behavior
datemin
anddatemax
should be in ISO 8601 YYYY-MM-DD formatdatemin
anddatemax
.datemax
is specified, it should only filter thedatemin
datemin is specified, it should only filter the
datemax`datemin
notdatemax
is specified, there should be no filtering.datemin
ordatemax
is not specified as an ISO string. Should return a400
error (bad request)Expected outcome
Related docs
The text was updated successfully, but these errors were encountered: