Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.

Commit e905d31

Browse files
committed
using latest lettuce core
1 parent 79755d4 commit e905d31

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

pom.xml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46

57
<parent>
@@ -28,6 +30,14 @@
2830
<id>java.net</id>
2931
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
3032
</repository>
33+
<repository>
34+
<id>sonatype-snapshots</id>
35+
<name>Sonatype Snapshot Repository</name>
36+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
37+
<snapshots>
38+
<enabled>true</enabled>
39+
</snapshots>
40+
</repository>
3141
</repositories>
3242

3343
<dependencies>
@@ -40,10 +50,15 @@
4050
<artifactId>lombok</artifactId>
4151
<optional>true</optional>
4252
</dependency>
53+
<dependency>
54+
<groupId>io.lettuce</groupId>
55+
<artifactId>lettuce-core</artifactId>
56+
<version>5.2.0.BUILD-SNAPSHOT</version>
57+
</dependency>
4358
<dependency>
4459
<groupId>com.redislabs</groupId>
4560
<artifactId>lettusearch</artifactId>
46-
<version>1.0.0</version>
61+
<version>1.0.3-SNAPSHOT</version>
4762
</dependency>
4863
<dependency>
4964
<groupId>org.springframework.boot</groupId>

src/main/java/com/redislabs/springredisearch/RediSearchConfiguration.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.redislabs.lettusearch.RediSearchClient;
1212
import com.redislabs.lettusearch.StatefulRediSearchConnection;
1313

14+
import io.lettuce.core.ClientOptions;
1415
import io.lettuce.core.RedisURI;
1516
import io.lettuce.core.resource.ClientResources;
1617
import io.lettuce.core.resource.DefaultClientResources;
@@ -32,6 +33,7 @@ public class RediSearchConfiguration {
3233
private Integer port;
3334
private String password;
3435
private Duration timeout;
36+
private boolean publishOnScheduler;
3537

3638
@Bean(destroyMethod = "shutdown")
3739
ClientResources clientResources() {
@@ -49,7 +51,9 @@ RediSearchClient client(ClientResources clientResources) {
4951
if (timeout != null) {
5052
redisURI.setTimeout(timeout);
5153
}
52-
return RediSearchClient.create(clientResources, redisURI);
54+
RediSearchClient client = RediSearchClient.create(clientResources, redisURI);
55+
client.setOptions(ClientOptions.builder().publishOnScheduler(publishOnScheduler).build());
56+
return client;
5357
}
5458

5559
@Bean(destroyMethod = "close")

0 commit comments

Comments
 (0)