Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,6 @@
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil</artifactId>
Expand Down Expand Up @@ -366,33 +361,21 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>2.0.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>2.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-junit-jupiter</artifactId>
<version>2.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-postgresql</artifactId>
<version>2.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-solr</artifactId>
<version>2.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -444,7 +427,7 @@
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>9.8.0</version>
<version>9.10.1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ public class SolrConfig implements SearchConfig {
@Min(1)
private int indexerClientQueueSize = 10;

@Override
/**
* Prefer http/1.1.
* This might help with network problems (e.g. reverse proxy).
* If unset, solr client tests a property see {@link HttpJdkSolrClient.Builder#useHttp1_1(boolean)}.
*/
@Nullable
private Boolean useHttp1_1;

@Override
public SolrProcessor createSearchProcessor(Environment environment, DatasetId datasetId) {
SolrProcessor solrProcessor = new SolrProcessor(() -> createSearchClient(datasetId.getName()),() -> createIndexClient(datasetId.getName()), commitWithin, filterValue);

Expand Down Expand Up @@ -76,6 +84,11 @@ public SolrClient createSearchClient(@Nullable String collection) {
builder.withBasicAuthCredentials(username, password);
}

if (useHttp1_1 != null) {
builder.useHttp1_1(useHttp1_1);
}


return builder.build();
}

Expand All @@ -90,6 +103,10 @@ public SolrClient createIndexClient(@Nullable String collection) {
http2Builder.withBasicAuthCredentials(username, password);
}

if (useHttp1_1 != null) {
http2Builder.useHttp1_1(useHttp1_1);
}

Http2SolrClient http2Client = http2Builder.build();

ConcurrentUpdateHttp2SolrClient.Builder concurrentClientBuilder = new ConcurrentUpdateHttp2SolrClient.Builder(baseSolrUrl, http2Client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.testcontainers.containers.SolrContainer;
import org.testcontainers.solr.SolrContainer;
import org.testcontainers.utility.DockerImageName;

@Slf4j
Expand All @@ -32,11 +32,11 @@ public void beforeAll(ExtensionContext context) throws Exception {
}

log.info("Spin up local container");
SolrContainer container = new SolrContainer(DockerImageName.parse("solr:9"));
container.withCollection(collection);
container.start();
solrContainer = new SolrContainer(DockerImageName.parse("solr:9.10.1"));
solrContainer.withCollection(collection);
solrContainer.start();

solrBaseUrl = "http://" + container.getHost() + ":" + container.getSolrPort() + "/solr";
solrBaseUrl = "http://" + solrContainer.getHost() + ":" + solrContainer.getSolrPort() + "/solr";
}

@Override
Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@
<module>autodoc</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>2.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Loading