From 5a73915a841b6291ad6c491e19970efb8dfd0050 Mon Sep 17 00:00:00 2001 From: Nishant Bhagat Date: Wed, 18 Oct 2023 15:17:38 -0500 Subject: [PATCH] Fix index refresh issue Signed-off-by: Nishant Bhagat --- .../opensearch/notifications/index/NotificationConfigIndex.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications/notifications/src/main/kotlin/org/opensearch/notifications/index/NotificationConfigIndex.kt b/notifications/notifications/src/main/kotlin/org/opensearch/notifications/index/NotificationConfigIndex.kt index b742c628..2cd6a5ae 100644 --- a/notifications/notifications/src/main/kotlin/org/opensearch/notifications/index/NotificationConfigIndex.kt +++ b/notifications/notifications/src/main/kotlin/org/opensearch/notifications/index/NotificationConfigIndex.kt @@ -291,7 +291,7 @@ internal object NotificationConfigIndex : ConfigOperations { */ override suspend fun updateNotificationConfig(id: String, notificationConfigDoc: NotificationConfigDoc): Boolean { createIndex() - val indexRequest = IndexRequest(INDEX_NAME) + val indexRequest = IndexRequest(INDEX_NAME).setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE) .source(notificationConfigDoc.toXContent()) .create(false) .id(id)