feat(opensearch): Updated status filter field name to match index and added time-range based search #5468
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.
Type of Change
Description
Task 1
The
status
field is different in different indexes:status
in Payment Attempts and Payment Intentsrefund_status
in Refundsdispute_status
in DisputesThe correct mapping of status for each index is done, to get the search-results
Task 2
Added
Time Range based search
for the OpenSearch queryAdditional Changes
Motivation and Context
Giving a better search experience for the merchants through the dashboard global-search
How did you test it?
Tested through Postman curls:
Task 1
status
assuccess
This will return the results of
Refunds
as internally, thestatus
field gets converted intorefund_status
andsuccess
is theSuccessful operation
inRefunds
Task 2
Able to search based on the
timeRange
included in the request bodyChecklist
cargo +nightly fmt --all
cargo clippy