From f8e00311c94a67d0982674cf518d8f330db298c2 Mon Sep 17 00:00:00 2001 From: Nishant Bhagat Date: Tue, 17 Oct 2023 23:57:45 -0500 Subject: [PATCH] Fix index refresh issue --- .../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 bc63de0e..b742c628 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 @@ -182,7 +182,7 @@ internal object NotificationConfigIndex : ConfigOperations { */ override suspend fun createNotificationConfig(configDoc: NotificationConfigDoc, id: String?): String? { createIndex() - val indexRequest = IndexRequest(INDEX_NAME) + val indexRequest = IndexRequest(INDEX_NAME).setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE) .source(configDoc.toXContent()) .create(true) if (id != null) {