navapbc / simpler-grants-gov

https://simpler.grants.gov
Other
1 stars 0 forks source link

[Task]: Modify the opensearch query builder to handle date ranges #164

Closed chouinar closed 2 months ago

chouinar commented 3 months ago

Summary

Update https://github.com/navapbc/simpler-grants-gov/blob/main/api/src/adapters/search/opensearch_query_builder.py to allow for us to pass in date fields with start/end values and handle converting to the proper opensearch request. A null start or end date should be considered valid (and treated as open-ended). We should treat dates as inclusive (so gte instead of gt).

See: https://opensearch.org/docs/latest/query-dsl/term/range/#date-fields for details on how to construct these queries.

I suggest you add dates to the test data in https://github.com/navapbc/simpler-grants-gov/blob/main/api/tests/src/adapters/search/test_opensearch_query_builder.py in order to test this easily.

Acceptance criteria

acouch commented 1 month ago

Issue migrated to hhs/simpler-grants-gov#2043

acouch commented 1 month ago

Issue migrated to hhs/simpler-grants-gov#2044