Skip to content

Commit

Permalink
Update TransportGetFindingsSearchAction.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Annie Lee committed Mar 29, 2022
1 parent 2f84775 commit 5ed68b2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,13 @@ class TransportGetFindingsSearchAction @Inject constructor(
}
}

fun search(searchSourceBuilder: SearchSourceBuilder, actionListener: ActionListener<GetFindingsSearchResponse>) {
log.info("Entering RestGetFindingsSearchAction.kt.")
fun search(searchSourceBuilder: SearchSourceBuilder, actionListener: ActionListener<SearchResponse>) {
val searchRequest = SearchRequest()
.source(searchSourceBuilder)
.indices(".opensearch-alerting-findings")
client.search(
searchRequest,
object : ActionListener<GetFindingsSearchResponse> {
object : ActionListener<SearchResponse> {
override fun onResponse(response: GetFindingsSearchResponse) {
val totalFindingCount = response.hits.totalHits?.value?.toInt()
val findings = mutableListOf<Finding>()
Expand Down

0 comments on commit 5ed68b2

Please sign in to comment.