nicer main action names
This commit is contained in:
parent
83d5084f62
commit
beb5986256
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -69,7 +69,7 @@ public class TransportCountAction extends TransportBroadcastOperationAction<Coun
|
|||
|
||||
@Override
|
||||
protected String transportShardAction() {
|
||||
return "indices/count/shard";
|
||||
return TransportActions.COUNT + "/shard";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.elasticsearch.action.deletebyquery;
|
||||
|
||||
import org.elasticsearch.action.TransportActions;
|
||||
import org.elasticsearch.action.support.replication.TransportIndexReplicationOperationAction;
|
||||
import org.elasticsearch.cluster.ClusterService;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
|
@ -68,7 +69,7 @@ public class TransportIndexDeleteByQueryAction extends TransportIndexReplication
|
|||
|
||||
@Override
|
||||
protected String transportAction() {
|
||||
return "indices/index/deleteByQuery";
|
||||
return TransportActions.DELETE_BY_QUERY + "/index";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
package org.elasticsearch.action.deletebyquery;
|
||||
|
||||
import org.elasticsearch.ElasticSearchIllegalStateException;
|
||||
import org.elasticsearch.action.TransportActions;
|
||||
import org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction;
|
||||
import org.elasticsearch.cluster.ClusterService;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
|
@ -74,7 +75,7 @@ public class TransportShardDeleteByQueryAction extends TransportShardReplication
|
|||
|
||||
@Override
|
||||
protected String transportAction() {
|
||||
return "indices/index/shard/deleteByQuery";
|
||||
return TransportActions.DELETE_BY_QUERY + "/shard";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,8 +40,6 @@ import org.elasticsearch.transport.TransportService;
|
|||
|
||||
/**
|
||||
* Performs the get operation.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class TransportGetAction extends TransportShardSingleOperationAction<GetRequest, GetResponse> {
|
||||
|
||||
|
@ -70,7 +68,7 @@ public class TransportGetAction extends TransportShardSingleOperationAction<GetR
|
|||
|
||||
@Override
|
||||
protected String transportShardAction() {
|
||||
return "indices/get/shard";
|
||||
return TransportActions.GET + "/shard";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ package org.elasticsearch.action.get;
|
|||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.ExceptionsHelper;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.TransportActions;
|
||||
import org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction;
|
||||
import org.elasticsearch.cluster.ClusterService;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
|
@ -63,12 +64,12 @@ public class TransportShardMultiGetAction extends TransportShardSingleOperationA
|
|||
|
||||
@Override
|
||||
protected String transportAction() {
|
||||
return "indices/mget/shard";
|
||||
return TransportActions.MULTI_GET + "/shard";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String transportShardAction() {
|
||||
return "indices/mget/shard/s";
|
||||
return TransportActions.MULTI_GET + "/shard/s";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -70,7 +70,7 @@ public class TransportPercolateAction extends TransportSingleCustomOperationActi
|
|||
|
||||
@Override
|
||||
protected String transportShardAction() {
|
||||
return "indices/percolate/shard";
|
||||
return TransportActions.PERCOLATE + "/shard";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue