Fixed no valid missing index type error.
This commit is contained in:
parent
24ce2ef537
commit
33e7d769ca
|
@ -59,7 +59,9 @@ public class RestClearIndicesCacheAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
ClearIndicesCacheRequest clearIndicesCacheRequest = new ClearIndicesCacheRequest(RestActions.splitIndices(request.param("index")));
|
||||
clearIndicesCacheRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
clearIndicesCacheRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
try {
|
||||
clearIndicesCacheRequest.filterCache(request.paramAsBoolean("filter", clearIndicesCacheRequest.filterCache()));
|
||||
clearIndicesCacheRequest.fieldDataCache(request.paramAsBoolean("field_data", clearIndicesCacheRequest.fieldDataCache()));
|
||||
|
|
|
@ -58,7 +58,9 @@ public class RestFlushAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
FlushRequest flushRequest = new FlushRequest(RestActions.splitIndices(request.param("index")));
|
||||
flushRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
flushRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
BroadcastOperationThreading operationThreading = BroadcastOperationThreading.fromString(request.param("operationThreading"), BroadcastOperationThreading.SINGLE_THREAD);
|
||||
if (operationThreading == BroadcastOperationThreading.NO_THREADS) {
|
||||
// since we don't spawn, don't allow no_threads, but change it to a single thread
|
||||
|
|
|
@ -53,7 +53,9 @@ public class RestGatewaySnapshotAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
GatewaySnapshotRequest gatewaySnapshotRequest = new GatewaySnapshotRequest(RestActions.splitIndices(request.param("index")));
|
||||
gatewaySnapshotRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
gatewaySnapshotRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
client.admin().indices().gatewaySnapshot(gatewaySnapshotRequest, new ActionListener<GatewaySnapshotResponse>() {
|
||||
@Override
|
||||
public void onResponse(GatewaySnapshotResponse response) {
|
||||
|
|
|
@ -59,7 +59,9 @@ public class RestOptimizeAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
OptimizeRequest optimizeRequest = new OptimizeRequest(RestActions.splitIndices(request.param("index")));
|
||||
optimizeRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
optimizeRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
try {
|
||||
optimizeRequest.waitForMerge(request.paramAsBoolean("wait_for_merge", optimizeRequest.waitForMerge()));
|
||||
optimizeRequest.maxNumSegments(request.paramAsInt("max_num_segments", optimizeRequest.maxNumSegments()));
|
||||
|
|
|
@ -58,7 +58,9 @@ public class RestRefreshAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
RefreshRequest refreshRequest = new RefreshRequest(RestActions.splitIndices(request.param("index")));
|
||||
refreshRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
refreshRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
BroadcastOperationThreading operationThreading = BroadcastOperationThreading.fromString(request.param("operation_threading"), BroadcastOperationThreading.SINGLE_THREAD);
|
||||
if (operationThreading == BroadcastOperationThreading.NO_THREADS) {
|
||||
// since we don't spawn, don't allow no_threads, but change it to a single thread
|
||||
|
|
|
@ -53,7 +53,9 @@ public class RestIndicesSegmentsAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
IndicesSegmentsRequest indicesSegmentsRequest = new IndicesSegmentsRequest(splitIndices(request.param("index")));
|
||||
indicesSegmentsRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
indicesSegmentsRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
BroadcastOperationThreading operationThreading = BroadcastOperationThreading.fromString(request.param("operation_threading"), BroadcastOperationThreading.SINGLE_THREAD);
|
||||
if (operationThreading == BroadcastOperationThreading.NO_THREADS) {
|
||||
// since we don't spawn, don't allow no_threads, but change it to a single thread
|
||||
|
|
|
@ -83,7 +83,9 @@ public class RestIndicesStatsAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
IndicesStatsRequest indicesStatsRequest = new IndicesStatsRequest();
|
||||
indicesStatsRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
indicesStatsRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
boolean clear = request.paramAsBoolean("clear", false);
|
||||
if (clear) {
|
||||
indicesStatsRequest.clear();
|
||||
|
|
|
@ -60,7 +60,9 @@ public class RestIndicesStatusAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
IndicesStatusRequest indicesStatusRequest = new IndicesStatusRequest(splitIndices(request.param("index")));
|
||||
indicesStatusRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
indicesStatusRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
indicesStatusRequest.recovery(request.paramAsBoolean("recovery", indicesStatusRequest.recovery()));
|
||||
indicesStatusRequest.snapshot(request.paramAsBoolean("snapshot", indicesStatusRequest.snapshot()));
|
||||
BroadcastOperationThreading operationThreading = BroadcastOperationThreading.fromString(request.param("operation_threading"), BroadcastOperationThreading.SINGLE_THREAD);
|
||||
|
|
|
@ -63,7 +63,9 @@ public class RestValidateQueryAction extends BaseRestHandler {
|
|||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
ValidateQueryRequest validateQueryRequest = new ValidateQueryRequest(RestActions.splitIndices(request.param("index")));
|
||||
validateQueryRequest.listenerThreaded(false);
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
validateQueryRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
try {
|
||||
BroadcastOperationThreading operationThreading = BroadcastOperationThreading.fromString(request.param("operation_threading"), BroadcastOperationThreading.SINGLE_THREAD);
|
||||
if (operationThreading == BroadcastOperationThreading.NO_THREADS) {
|
||||
|
|
|
@ -62,7 +62,9 @@ public class RestCountAction extends BaseRestHandler {
|
|||
@Override
|
||||
public void handleRequest(final RestRequest request, final RestChannel channel) {
|
||||
CountRequest countRequest = new CountRequest(RestActions.splitIndices(request.param("index")));
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
countRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
countRequest.listenerThreaded(false);
|
||||
try {
|
||||
BroadcastOperationThreading operationThreading = BroadcastOperationThreading.fromString(request.param("operation_threading"), BroadcastOperationThreading.SINGLE_THREAD);
|
||||
|
|
|
@ -61,7 +61,10 @@ public class RestMultiSearchAction extends BaseRestHandler {
|
|||
|
||||
String[] indices = RestActions.splitIndices(request.param("index"));
|
||||
String[] types = RestActions.splitTypes(request.param("type"));
|
||||
IgnoreIndices ignoreIndices = IgnoreIndices.fromString(request.param("ignore_indices"));
|
||||
IgnoreIndices ignoreIndices = null;
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
IgnoreIndices.fromString(request.param("ignore_indices"));
|
||||
}
|
||||
|
||||
try {
|
||||
multiSearchRequest.add(request.content(), request.contentUnsafe(), indices, types, request.param("search_type"), ignoreIndices);
|
||||
|
|
|
@ -142,7 +142,9 @@ public class RestSearchAction extends BaseRestHandler {
|
|||
searchRequest.queryHint(request.param("query_hint"));
|
||||
searchRequest.routing(request.param("routing"));
|
||||
searchRequest.preference(request.param("preference"));
|
||||
if (request.hasParam("ignore_indices")) {
|
||||
searchRequest.ignoreIndices(IgnoreIndices.fromString(request.param("ignore_indices")));
|
||||
}
|
||||
|
||||
return searchRequest;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue