Revision 40670
Added by Sandro La Bruzzo almost 9 years ago
modules/dnet-index-solr-service/trunk/src/test/java/TestSolr.java | ||
---|---|---|
1 |
import eu.dnetlib.data.provision.index.rmi.IndexServiceException; |
|
2 |
import eu.dnetlib.functionality.index.utils.RemoteSolrAdministrator; |
|
3 |
import org.apache.http.client.HttpClient; |
|
4 |
import org.apache.http.impl.client.HttpClientBuilder; |
|
5 |
import org.junit.Test; |
|
6 |
|
|
7 |
/** |
|
8 |
* Created by Sandro La Bruzzo on 1/8/16. |
|
9 |
*/ |
|
10 |
|
|
11 |
|
|
12 |
public class TestSolr { |
|
13 |
|
|
14 |
|
|
15 |
@Test |
|
16 |
public void testCollectionExists() throws IndexServiceException { |
|
17 |
|
|
18 |
|
|
19 |
RemoteSolrAdministrator admin = new RemoteSolrAdministrator(); |
|
20 |
|
|
21 |
HttpClient client = HttpClientBuilder.create().build(); |
|
22 |
admin.setHttpClient(client); |
|
23 |
|
|
24 |
System.out.println("DLIF Exists : " + admin.indexCollectionExists("DLIF-index-cleand", "localhost", "8983")); |
|
25 |
|
|
26 |
} |
|
27 |
|
|
28 |
} |
modules/dnet-index-solr-service/trunk/pom.xml | ||
---|---|---|
22 | 22 |
<dependency> |
23 | 23 |
<groupId>eu.dnetlib</groupId> |
24 | 24 |
<artifactId>dnet-index-solr-client</artifactId> |
25 |
<version>[2.0.0,3.0.0)</version>
|
|
25 |
<version>[2.0.0,2.9.9)</version>
|
|
26 | 26 |
</dependency> |
27 | 27 |
</dependencies> |
28 | 28 |
</project> |
Also available in: Unified diff
fixed dependencies