Remove deprecations from master (follow up to #7922)

This commit is contained in:
Ryan Ernst 2014-10-07 08:35:11 -07:00
parent c021f22523
commit c06c10bbb0
5 changed files with 1 additions and 32 deletions

View File

@ -37,8 +37,6 @@ deletes. Defaults to `false`. Note that this won't override the
to `true`. Note, a merge can potentially be a very heavy operation, so to `true`. Note, a merge can potentially be a very heavy operation, so
it might make sense to run it set to `false`. it might make sense to run it set to `false`.
`force`:: deprecated[1.4.0, Use the upgrade API]
[float] [float]
[[optimize-multi-index]] [[optimize-multi-index]]
=== Multi Index === Multi Index

View File

@ -44,10 +44,6 @@
"wait_for_merge": { "wait_for_merge": {
"type" : "boolean", "type" : "boolean",
"description" : "Specify whether the request should block until the merge process is finished (default: true)" "description" : "Specify whether the request should block until the merge process is finished (default: true)"
},
"force": {
"type": "boolean",
"description": "Force a merge operation to run, even if there is a single segment in the index (default: false)"
} }
} }
}, },

View File

@ -133,23 +133,6 @@ public class OptimizeRequest extends BroadcastOperationRequest<OptimizeRequest>
return this; return this;
} }
/**
* @deprecated See {@link #upgrade()}
*/
@Deprecated
public boolean force() {
return upgrade;
}
/**
* @deprecated Use {@link #upgrade(boolean)}.
*/
@Deprecated
public OptimizeRequest force(boolean force) {
this.upgrade = force;
return this;
}
/** /**
* Should the merge upgrade all old segments to the current index format. * Should the merge upgrade all old segments to the current index format.
* Defaults to <tt>false</tt>. * Defaults to <tt>false</tt>.

View File

@ -48,7 +48,7 @@ class ShardOptimizeRequest extends BroadcastShardOperationRequest {
maxNumSegments = request.maxNumSegments(); maxNumSegments = request.maxNumSegments();
onlyExpungeDeletes = request.onlyExpungeDeletes(); onlyExpungeDeletes = request.onlyExpungeDeletes();
flush = request.flush(); flush = request.flush();
upgrade = request.force() || request.upgrade(); upgrade = request.upgrade();
} }
boolean waitForMerge() { boolean waitForMerge() {

View File

@ -20,21 +20,13 @@
package org.elasticsearch.rest.action.admin.indices.upgrade; package org.elasticsearch.rest.action.admin.indices.upgrade;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.HttpClients;
import org.apache.lucene.util.Version;
import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.ListenableActionFuture;
import org.elasticsearch.action.admin.indices.segments.IndicesSegmentResponse;
import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.node.internal.InternalNode; import org.elasticsearch.node.internal.InternalNode;
import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest; import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
import org.elasticsearch.test.rest.client.RestResponse;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder; import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse; import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.elasticsearch.test.rest.json.JsonPath; import org.elasticsearch.test.rest.json.JsonPath;