feat(opensearch): Updated status filter field name to match index and added time-range based search (#5468)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sandeep Kumar
2024-08-01 15:09:20 +05:30
committed by GitHub
parent 6140cfe04e
commit 625f5ae289
3 changed files with 126 additions and 7 deletions

View File

@ -97,6 +97,10 @@ pub async fn msearch_results(
};
};
if let Some(time_range) = req.time_range {
query_builder.set_time_range(time_range.into()).switch()?;
};
let response_text: OpenMsearchOutput = client
.execute(query_builder)
.await
@ -221,6 +225,11 @@ pub async fn search_results(
}
};
};
if let Some(time_range) = search_req.time_range {
query_builder.set_time_range(time_range.into()).switch()?;
};
query_builder
.set_offset_n_count(search_req.offset, search_req.count)
.switch()?;