浏览代码

Remove deprecations from master (follow up to #7922)

Ryan Ernst 11 年之前
父节点
当前提交
c06c10bbb0

+ 0 - 2
docs/reference/indices/optimize.asciidoc

@@ -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
 it might make sense to run it set to `false`.
 
-`force`:: deprecated[1.4.0, Use the upgrade API]
-
 [float]
 [[optimize-multi-index]]
 === Multi Index

+ 0 - 4
rest-api-spec/api/indices.optimize.json

@@ -44,10 +44,6 @@
         "wait_for_merge": {
           "type" : "boolean",
           "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)"
         }
       }
     },

+ 0 - 17
src/main/java/org/elasticsearch/action/admin/indices/optimize/OptimizeRequest.java

@@ -133,23 +133,6 @@ public class OptimizeRequest extends BroadcastOperationRequest<OptimizeRequest>
         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.
      * Defaults to <tt>false</tt>.

+ 1 - 1
src/main/java/org/elasticsearch/action/admin/indices/optimize/ShardOptimizeRequest.java

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

+ 0 - 8
src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java

@@ -20,21 +20,13 @@
 package org.elasticsearch.rest.action.admin.indices.upgrade;
 
 import com.google.common.base.Predicate;
-import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.http.impl.client.HttpClients;
-import org.apache.lucene.util.Version;
 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.common.settings.ImmutableSettings;
 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.test.ElasticsearchBackwardsCompatIntegrationTest;
-import org.elasticsearch.test.rest.client.RestResponse;
 import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
 import org.elasticsearch.test.rest.client.http.HttpResponse;
 import org.elasticsearch.test.rest.json.JsonPath;