From a6fa96d51397edf0ce7f1f5c8b853452c641dc22 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 6 Oct 2016 20:41:19 +0200 Subject: [PATCH] Remove confusing capturing groups in _rollover index name pattern --- .../admin/indices/rollover/TransportRolloverAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java b/core/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java index aeb2fe78dfe..de88801825a 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java +++ b/core/src/main/java/org/elasticsearch/action/admin/indices/rollover/TransportRolloverAction.java @@ -61,7 +61,7 @@ import static java.util.Collections.unmodifiableList; */ public class TransportRolloverAction extends TransportMasterNodeAction { - private static final Pattern INDEX_NAME_PATTERN = Pattern.compile("^.*-(\\d)+$"); + private static final Pattern INDEX_NAME_PATTERN = Pattern.compile("^.*-\\d+$"); private final MetaDataCreateIndexService createIndexService; private final MetaDataIndexAliasesService indexAliasesService; private final ActiveShardsObserver activeShardsObserver; @@ -186,7 +186,7 @@ public class TransportRolloverAction extends TransportMasterNodeAction" : ""); return newName; } else { - throw new IllegalArgumentException("index name [" + sourceIndexName + "] does not match pattern '^.*-(\\d)+$'"); + throw new IllegalArgumentException("index name [" + sourceIndexName + "] does not match pattern '^.*-\\d+$'"); } }