From beb5986256f832ef9fc4cd3639120e2b97701296 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Tue, 3 Jan 2012 01:04:08 +0200 Subject: [PATCH] nicer main action names --- .../action/TransportActions.java | 43 +++++++------------ .../action/bulk/TransportShardBulkAction.java | 3 +- .../action/count/TransportCountAction.java | 2 +- .../TransportIndexDeleteByQueryAction.java | 3 +- .../TransportShardDeleteByQueryAction.java | 3 +- .../action/get/TransportGetAction.java | 4 +- .../get/TransportShardMultiGetAction.java | 5 ++- .../percolate/TransportPercolateAction.java | 2 +- 8 files changed, 27 insertions(+), 38 deletions(-) diff --git a/src/main/java/org/elasticsearch/action/TransportActions.java b/src/main/java/org/elasticsearch/action/TransportActions.java index 9e6c061e518..f98af2c008a 100644 --- a/src/main/java/org/elasticsearch/action/TransportActions.java +++ b/src/main/java/org/elasticsearch/action/TransportActions.java @@ -24,39 +24,26 @@ package org.elasticsearch.action; */ public class TransportActions { - public static final String BULK = "indices/bulk"; - - public static final String INDEX = "indices/index/shard/index"; - + public static final String BULK = "bulk"; + public static final String INDEX = "index"; public static final String UPDATE = "update"; - - public static final String COUNT = "indices/count"; - - public static final String DELETE = "indices/index/shard/delete"; - - public static final String DELETE_BY_QUERY = "indices/deleteByQuery"; - - public static final String GET = "indices/get"; - - public static final String MULTI_GET = "indices/mget"; - - public static final String SEARCH = "indices/search"; - - public static final String SEARCH_SCROLL = "indices/searchScroll"; - - public static final String TERMS = "indices/terms"; - - public static final String MORE_LIKE_THIS = "indices/moreLikeThis"; - - public static final String PERCOLATE = "indices/percolate"; + public static final String COUNT = "count"; + public static final String DELETE = "delete"; + public static final String DELETE_BY_QUERY = "deleteByQuery"; + public static final String GET = "get"; + public static final String MULTI_GET = "mget"; + public static final String SEARCH = "search"; + public static final String SEARCH_SCROLL = "searchScroll"; + public static final String MORE_LIKE_THIS = "mlt"; + public static final String PERCOLATE = "percolate"; public static class Admin { public static class Indices { - public static final String CREATE = "indices/createIndex"; - public static final String DELETE = "indices/deleteIndex"; - public static final String OPEN = "indices/openIndex"; - public static final String CLOSE = "indices/closeIndex"; + public static final String CREATE = "indices/create"; + public static final String DELETE = "indices/delete"; + public static final String OPEN = "indices/open"; + public static final String CLOSE = "indices/close"; public static final String FLUSH = "indices/flush"; public static final String REFRESH = "indices/refresh"; public static final String OPTIMIZE = "indices/optimize"; diff --git a/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java b/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java index dbd0ed0df8b..d397be17531 100644 --- a/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java +++ b/src/main/java/org/elasticsearch/action/bulk/TransportShardBulkAction.java @@ -23,6 +23,7 @@ import org.elasticsearch.ElasticSearchException; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.RoutingMissingException; +import org.elasticsearch.action.TransportActions; import org.elasticsearch.action.delete.DeleteRequest; import org.elasticsearch.action.delete.DeleteResponse; import org.elasticsearch.action.index.IndexRequest; @@ -102,7 +103,7 @@ public class TransportShardBulkAction extends TransportShardReplicationOperation @Override protected String transportAction() { - return "indices/index/shard/bulk"; + return TransportActions.BULK + "/shard"; } @Override diff --git a/src/main/java/org/elasticsearch/action/count/TransportCountAction.java b/src/main/java/org/elasticsearch/action/count/TransportCountAction.java index 117730cae4c..5f59c4ced22 100644 --- a/src/main/java/org/elasticsearch/action/count/TransportCountAction.java +++ b/src/main/java/org/elasticsearch/action/count/TransportCountAction.java @@ -69,7 +69,7 @@ public class TransportCountAction extends TransportBroadcastOperationAction { @@ -70,7 +68,7 @@ public class TransportGetAction extends TransportShardSingleOperationAction