From 69f1ffb1f806f4172b678c304834ffce66fb6679 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 17 Jan 2017 17:29:43 +0100 Subject: [PATCH] fix exception message --- .../org/elasticsearch/action/search/RemoteClusterService.java | 2 +- .../elasticsearch/action/search/RemoteClusterServiceTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/search/RemoteClusterService.java b/core/src/main/java/org/elasticsearch/action/search/RemoteClusterService.java index 55202556d28..92b4ca5f0b3 100644 --- a/core/src/main/java/org/elasticsearch/action/search/RemoteClusterService.java +++ b/core/src/main/java/org/elasticsearch/action/search/RemoteClusterService.java @@ -201,7 +201,7 @@ public final class RemoteClusterService extends AbstractComponent implements Clo // remote_cluster_alias:index_name - for this case we fail the request. the user can easily change the cluster alias // if that happens throw new IllegalArgumentException("Can not filter indices; index " + index + - " exists but there is also a remote cluster named: " + remoteClusterName + " can't filter indices"); + " exists but there is also a remote cluster named: " + remoteClusterName); } indexName = index.substring(i + 1); clusterName = remoteClusterName; diff --git a/core/src/test/java/org/elasticsearch/action/search/RemoteClusterServiceTests.java b/core/src/test/java/org/elasticsearch/action/search/RemoteClusterServiceTests.java index 57b0a341554..1531d66e5da 100644 --- a/core/src/test/java/org/elasticsearch/action/search/RemoteClusterServiceTests.java +++ b/core/src/test/java/org/elasticsearch/action/search/RemoteClusterServiceTests.java @@ -146,7 +146,7 @@ public class RemoteClusterServiceTests extends ESTestCase { "cluster_2:foo:bar", "cluster_1:test", "cluster_2:foo*", "foo"}, i -> "cluster_1:bar".equals(i))); assertEquals("Can not filter indices; index cluster_1:bar exists but there is also a remote cluster named:" + - " cluster_1 can't filter indices", iae.getMessage()); + " cluster_1", iae.getMessage()); } } }