From 10660d390d760cde78fb115107c04e1cf104a4da Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 18 Jul 2011 22:15:22 +0300 Subject: [PATCH] allow to set specific routing index_routing and search_routing names as well --- .../admin/indices/alias/RestIndicesAliasesAction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/RestIndicesAliasesAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/RestIndicesAliasesAction.java index 1eb0e48309e..83b2c5feda4 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/RestIndicesAliasesAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/RestIndicesAliasesAction.java @@ -41,7 +41,7 @@ import java.io.IOException; import java.util.Map; import static org.elasticsearch.cluster.metadata.AliasAction.*; -import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds; +import static org.elasticsearch.common.unit.TimeValue.*; import static org.elasticsearch.rest.RestRequest.Method.*; import static org.elasticsearch.rest.RestStatus.*; import static org.elasticsearch.rest.action.support.RestXContentBuilder.*; @@ -106,10 +106,10 @@ public class RestIndicesAliasesAction extends BaseRestHandler { } else if ("routing".equals(currentFieldName)) { routing = parser.textOrNull(); routingSet = true; - } else if ("indexRouting".equals(currentFieldName) || "index-routing".equals(currentFieldName)) { + } else if ("indexRouting".equals(currentFieldName) || "index-routing".equals(currentFieldName) || "index_routing".equals(currentFieldName)) { indexRouting = parser.textOrNull(); indexRoutingSet = true; - } else if ("searchRouting".equals(currentFieldName) || "search-routing".equals(currentFieldName)) { + } else if ("searchRouting".equals(currentFieldName) || "search-routing".equals(currentFieldName) || "search_routing".equals(currentFieldName)) { searchRouting = parser.textOrNull(); searchRoutingSet = true; }