Closed chouinar closed 2 months ago
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).
gte
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.
Issue migrated to hhs/simpler-grants-gov#2043
Issue migrated to hhs/simpler-grants-gov#2044
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 ofgt
).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