From c258896236e8ee518b84c6734bfd36c82ebc6768 Mon Sep 17 00:00:00 2001 From: Ronnak Saxena <63483386+ronnaksaxena@users.noreply.github.com> Date: Wed, 23 Aug 2023 10:03:04 -0700 Subject: [PATCH] Update RollupInterceptor.kt uncommeneted rollup size check Signed-off-by: Ronnak Saxena --- .../indexmanagement/rollup/interceptor/RollupInterceptor.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt b/src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt index 1ccdf7995..ddb441217 100644 --- a/src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt +++ b/src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt @@ -85,9 +85,9 @@ class RollupInterceptor( val index = request.shardId().indexName val isRollupIndex = isRollupIndex(index, clusterService.state()) if (isRollupIndex) { -// if (request.source().size() != 0) { -// throw IllegalArgumentException("Rollup search must have size explicitly set to 0, but found ${request.source().size()}") -// } + if (request.source().size() != 0) { + throw IllegalArgumentException("Rollup search must have size explicitly set to 0, but found ${request.source().size()}") + } val indices = request.indices().map { it.toString() }.toTypedArray() val concreteIndices = indexNameExpressionResolver