remove deprecated api

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1307319 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sami Siren 2012-03-30 09:03:09 +00:00
parent 95f80348f6
commit 42141717a3
4 changed files with 11 additions and 65 deletions

View File

@ -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<SolrInputDocument> documents = null;
private Iterator<SolrInputDocument> 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<SolrInputDocument> docIterator) {
this.docIterator = docIterator;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;