Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
misc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Himanshu Setia committed Sep 11, 2020
1 parent 71234c6 commit 4115f97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class RefreshSearchAnalyzerResponse : BroadcastResponse {
override fun toXContent(builder: XContentBuilder, params: Params?): XContentBuilder? {
builder.startObject()
RestActions.buildBroadcastShardsHeader(builder, params, totalShards, successfulShards, -1, failedShards, shardFailures.toTypedArray())
builder.startArray("successful_refreshes")
builder.startArray("successful_refresh_details")
val successfulIndices = getSuccessfulRefreshDetails()
for (index in successfulIndices.keys) {
val reloadedAnalyzers = successfulIndices.get(index)!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ class TransportRefreshSearchAnalyzerAction :
return clusterState.routingTable().allShards(concreteIndices)
}

override fun checkGlobalBlock(state: ClusterState, request: RefreshSearchAnalyzerRequest?): ClusterBlockException {
override fun checkGlobalBlock(state: ClusterState, request: RefreshSearchAnalyzerRequest?): ClusterBlockException? {
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE)
}

override fun checkRequestBlock(state: ClusterState, request: RefreshSearchAnalyzerRequest?, concreteIndices: Array<String?>?):
ClusterBlockException {
ClusterBlockException? {
return state.blocks().indicesBlockedException(ClusterBlockLevel.METADATA_WRITE, concreteIndices)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class RefreshSearchAnalyzerActionIT : IndexManagementRestTestCase() {
createIndex(indexName, settings, getAnalyzerMapping())
ingestData(indexName)

// Thread.sleep(1000) // wait for refresh interval
assertTrue(queryData(indexName, "hello").contains("hello world"))

// check synonym
Expand Down Expand Up @@ -89,7 +88,6 @@ class RefreshSearchAnalyzerActionIT : IndexManagementRestTestCase() {
createIndex(indexName, settings, getAnalyzerMapping())
ingestData(indexName)

// Thread.sleep(1000) // wait for refresh interval
assertTrue(queryData(indexName, "hello").contains("hello world"))

// check synonym
Expand Down Expand Up @@ -138,7 +136,6 @@ class RefreshSearchAnalyzerActionIT : IndexManagementRestTestCase() {
createIndex(indexName, settings, getAnalyzerMapping(), aliasSettings)
ingestData(indexName)

// Thread.sleep(1000) // wait for refresh interval
assertTrue(queryData(indexName, "hello").contains("hello world"))

// check synonym
Expand Down

0 comments on commit 4115f97

Please sign in to comment.