Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
  • Loading branch information
lezzago committed Apr 20, 2022
1 parent 3dfd72d commit 390ab08
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class DocLevelMonitorQueries(private val client: AdminClient, private val cluste
override fun onResponse(getAliasesResponse: GetAliasesResponse?) {
val aliasIndices = getAliasesResponse?.aliases?.keys()?.map { it.value }
val isAlias = aliasIndices != null && aliasIndices.isNotEmpty()
val indices = if (isAlias) getAliasesResponse?.aliases?.keys()?.map { it.value } else listOf(index)
val indices = if (isAlias) aliasIndices else listOf(index)
val indexRequests = mutableListOf<IndexRequest>()
log.info("indices: $indices")
indices?.forEach { indexName ->
Expand Down

0 comments on commit 390ab08

Please sign in to comment.