Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into queryFieldNames
  • Loading branch information
eirsep committed Jan 24, 2024
2 parents 3398241 + ffc183f commit 5e5a741
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import org.opensearch.commons.alerting.model.Workflow
import org.opensearch.commons.authuser.User
import org.opensearch.commons.utils.recreateObject
import org.opensearch.core.action.ActionListener
import org.opensearch.core.common.io.stream.NamedWriteableRegistry
import org.opensearch.index.query.BoolQueryBuilder
import org.opensearch.index.query.ExistsQueryBuilder
import org.opensearch.index.query.MatchQueryBuilder
Expand All @@ -41,7 +42,8 @@ class TransportSearchMonitorAction @Inject constructor(
val settings: Settings,
val client: Client,
clusterService: ClusterService,
actionFilters: ActionFilters
actionFilters: ActionFilters,
val namedWriteableRegistry: NamedWriteableRegistry
) : HandledTransportAction<ActionRequest, SearchResponse>(
AlertingActions.SEARCH_MONITORS_ACTION_NAME, transportService, actionFilters, ::SearchMonitorRequest
),
Expand All @@ -54,7 +56,7 @@ class TransportSearchMonitorAction @Inject constructor(

override fun doExecute(task: Task, request: ActionRequest, actionListener: ActionListener<SearchResponse>) {
val transformedRequest = request as? SearchMonitorRequest
?: recreateObject(request) {
?: recreateObject(request, namedWriteableRegistry) {
SearchMonitorRequest(it)
}

Expand Down

0 comments on commit 5e5a741

Please sign in to comment.