Project

General

Profile

« Previous | Next » 

Revision 54015

why not expose a method to commit the pending changes?

View differences:

modules/dnet-openaireplus-mapping-utils/trunk/src/main/java/eu/dnetlib/data/index/CloudIndexClient.java
12 12
import org.apache.commons.logging.Log;
13 13
import org.apache.commons.logging.LogFactory;
14 14
import org.apache.solr.client.solrj.SolrQuery;
15
import org.apache.solr.client.solrj.SolrServerException;
15 16
import org.apache.solr.client.solrj.impl.CloudSolrServer;
16 17
import org.apache.solr.client.solrj.response.QueryResponse;
17 18
import org.apache.solr.client.solrj.response.UpdateResponse;
......
156 157
		}
157 158
	}
158 159

  
160
	public void commit() throws CloudIndexClientException {
161
		if(solrClient != null) {
162
			try {
163
				solrClient.commit();
164
			} catch (SolrServerException | IOException e) {
165
				throw new CloudIndexClientException(e.getMessage());
166
			}
167
		}
168
	}
169

  
159 170
	public interface AfterFeedingCallback {
160 171

  
161 172
		void doAfterFeeding(final UpdateResponse response);

Also available in: Unified diff