diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java index 6ada4acbb7b..5254d3d4943 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java @@ -27,8 +27,6 @@ import java.util.Iterator; import org.apache.solr.client.solrj.util.ClientUtils; import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.common.params.UpdateParams; import org.apache.solr.common.util.ContentStream; import org.apache.solr.common.util.XML; @@ -38,16 +36,6 @@ import org.apache.solr.common.util.XML; * @since solr 1.3 */ public class UpdateRequest extends AbstractUpdateRequest { - /** - * Kept for back compatibility. - * - * @deprecated Use {@link AbstractUpdateRequest.ACTION} instead - */ - @Deprecated - public enum ACTION { - COMMIT, - OPTIMIZE - }; private List documents = null; private Iterator docIterator = null; @@ -130,48 +118,6 @@ public class UpdateRequest extends AbstractUpdateRequest { return this; } - /** Sets appropriate parameters for the given ACTION - * - * @deprecated Use {@link org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION} instead - * */ - @Deprecated - public UpdateRequest setAction(ACTION action, boolean waitFlush, boolean waitSearcher ) { - return setAction(action, waitFlush, waitSearcher, 1); - } - - /** - * - * @deprecated Use {@link org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION} instead - */ - @Deprecated - public UpdateRequest setAction(ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments ) { - if (params == null) - params = new ModifiableSolrParams(); - - if( action == ACTION.OPTIMIZE ) { - params.set( UpdateParams.OPTIMIZE, "true" ); - params.set(UpdateParams.MAX_OPTIMIZE_SEGMENTS, maxSegments); - } - else if( action == ACTION.COMMIT ) { - params.set( UpdateParams.COMMIT, "true" ); - } - params.set( UpdateParams.WAIT_SEARCHER, waitSearcher+"" ); - return this; - } - - /** - * - * - * @deprecated Use {@link org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION} instead - */ - @Deprecated - public UpdateRequest setAction(ACTION action, boolean waitFlush, boolean waitSearcher, int maxSegments , boolean expungeDeletes) { - setAction(action, waitFlush, waitSearcher,maxSegments) ; - params.set(UpdateParams.EXPUNGE_DELETES,""+expungeDeletes); - return this; - } - - public void setDocIterator(Iterator docIterator) { this.docIterator = docIterator; } diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java b/solr/solrj/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java index aa31672cc3c..0665b93caba 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java @@ -22,7 +22,7 @@ import java.io.File; import org.apache.solr.client.solrj.request.CoreAdminRequest; import org.apache.solr.client.solrj.request.QueryRequest; import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.client.solrj.request.UpdateRequest.ACTION; +import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION; import org.apache.solr.client.solrj.response.CoreAdminResponse; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.util.NamedList; @@ -95,10 +95,10 @@ public abstract class MultiCoreExampleTestBase extends SolrExampleTestBase public void testMultiCore() throws Exception { UpdateRequest up = new UpdateRequest(); - up.setAction( ACTION.COMMIT, true, true ); - up.deleteByQuery( "*:*" ); - up.process( getSolrCore0() ); - up.process( getSolrCore1() ); + up.setAction(ACTION.COMMIT, true, true); + up.deleteByQuery("*:*"); + up.process(getSolrCore0()); + up.process(getSolrCore1()); up.clear(); // Add something to each core diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java index 4ba872a56a5..69992f8d36c 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MultiCoreExampleJettyTest.java @@ -24,7 +24,7 @@ import org.apache.solr.client.solrj.SolrServer; import org.apache.solr.client.solrj.impl.HttpSolrServer; import org.apache.solr.client.solrj.request.QueryRequest; import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.client.solrj.request.UpdateRequest.ACTION; +import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.SolrInputDocument; @@ -112,10 +112,10 @@ public class MultiCoreExampleJettyTest extends MultiCoreExampleTestBase { public void testDistributed() throws Exception { UpdateRequest up = new UpdateRequest(); - up.setAction( ACTION.COMMIT, true, true ); - up.deleteByQuery( "*:*" ); - up.process( getSolrCore0() ); - up.process( getSolrCore1() ); + up.setAction(ACTION.COMMIT, true, true); + up.deleteByQuery("*:*"); + up.process(getSolrCore0()); + up.process(getSolrCore1()); up.clear(); // Add something to each core diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java index 95c534b3440..312035b44e3 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/TestSolrProperties.java @@ -22,10 +22,10 @@ import org.apache.lucene.util.SystemPropertiesRestoreRule; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.SolrServer; +import org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION; import org.apache.solr.client.solrj.request.CoreAdminRequest; import org.apache.solr.client.solrj.request.QueryRequest; import org.apache.solr.client.solrj.request.UpdateRequest; -import org.apache.solr.client.solrj.request.UpdateRequest.ACTION; import org.apache.solr.client.solrj.response.CoreAdminResponse; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.util.FileUtils;