Revision 48991
Added by Claudio Atzori over 6 years ago
CloudIndexClient.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.data.index; |
2 | 2 |
|
3 |
import java.io.IOException; |
|
3 | 4 |
import java.text.SimpleDateFormat; |
4 | 5 |
import java.util.Date; |
5 | 6 |
import java.util.List; |
... | ... | |
7 | 8 |
import org.apache.commons.logging.Log; |
8 | 9 |
import org.apache.commons.logging.LogFactory; |
9 | 10 |
import org.apache.solr.client.solrj.SolrQuery; |
10 |
import org.apache.solr.client.solrj.impl.CloudSolrServer;
|
|
11 |
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
|
11 | 12 |
import org.apache.solr.client.solrj.response.QueryResponse; |
12 | 13 |
import org.apache.solr.client.solrj.response.UpdateResponse; |
13 | 14 |
import org.apache.solr.common.SolrInputDocument; |
... | ... | |
24 | 25 |
private static final Log log = LogFactory.getLog(CloudIndexClient.class); |
25 | 26 |
private static final String INDEX_RECORD_RESULT_FIELD = "dnetResult"; |
26 | 27 |
|
27 |
private final CloudSolrServer solrServer;
|
|
28 |
private final CloudSolrClient solrServer;
|
|
28 | 29 |
|
29 |
protected CloudIndexClient(final CloudSolrServer solrServer) {
|
|
30 |
protected CloudIndexClient(final CloudSolrClient solrServer) {
|
|
30 | 31 |
this.solrServer = solrServer; |
31 | 32 |
} |
32 | 33 |
|
... | ... | |
149 | 150 |
} |
150 | 151 |
} |
151 | 152 |
|
152 |
public void close() { |
|
153 |
public void close() throws IOException {
|
|
153 | 154 |
if (solrServer != null) { |
154 |
solrServer.shutdown();
|
|
155 |
solrServer.close();
|
|
155 | 156 |
} |
156 | 157 |
} |
157 | 158 |
|
Also available in: Unified diff
depending on protobuf specific version, getting rid of person entities, updated solrj version