Updated container group name, added test, updated readme
This commit is contained in:
parent
eb20f11c18
commit
ad4ba4fa9b
12
README.md
12
README.md
|
@ -10,7 +10,7 @@ The project is structured in two main components
|
|||
2. Create the data collection
|
||||
3. Feed the collection with the input documents, applying the necessary conversions
|
||||
|
||||
Step by step guide:
|
||||
### Step by step guide
|
||||
|
||||
1. Clone this project
|
||||
|
||||
|
@ -108,4 +108,14 @@ Hint: get the docker desktop client for a simplified access to the running conta
|
|||
|
||||
https://www.docker.com/products/docker-desktop/
|
||||
|
||||
### Interacting with Solr
|
||||
|
||||
The Solr and the zookeeper nodes run inside Docker images and interact sharing a network declared in the docker-compose
|
||||
file named `solr`. This implies that the internal cluster information known to Zookeeper refers to such a network.
|
||||
|
||||
When trying to use the `org.apache.solr.client.solrj.impl.CloudSolrClient` to interact with it from outside the `solr` network,
|
||||
it uses the information in Zookeeper to discover the solr nodes, which are however not resolvable from the outside.
|
||||
|
||||
The unit test `eu.dnetlib.dhp.solr.SolrClientTest` makes use of the `org.apache.solr.client.solrj.impl.LBHttp2SolrClient`
|
||||
to showcase how to query the Solr cluster running inside Docker, without needing to rely on the nodes discovery through Zookeeper.
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>openaire-solr-test</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
<artifactId>solr-solrj</artifactId>
|
||||
<version>${apache.solr.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.11.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<apache.solr.version>9.7.0</apache.solr.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
name: openaire-solr-importer
|
||||
name: openaire-solr
|
||||
services:
|
||||
solr1:
|
||||
image: solr:9.7.0
|
||||
|
|
Loading…
Reference in New Issue