Skip to content

Commit

Permalink
release: 0.8.8-SNAPSHOT - Spring Boot 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bsbodden committed Dec 29, 2023
1 parent 385f1a8 commit 7ce9afd
Show file tree
Hide file tree
Showing 23 changed files with 235 additions and 112 deletions.
24 changes: 15 additions & 9 deletions demos/roms-documents/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand All @@ -24,7 +24,7 @@
<maven.test.source>17</maven.test.source>
<maven.test.target>17</maven.test.target>
<maven.deploy.skip>true</maven.deploy.skip>
<testcontainers.redis.junit.version>1.6.3</testcontainers.redis.junit.version>
<testcontainers.redis.version>2.0.1</testcontainers.redis.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -54,16 +54,22 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.redis.testcontainers</groupId>
<artifactId>testcontainers-redis-junit</artifactId>
<version>${testcontainers.redis.junit.version}</version>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.0.0</version>
<groupId>com.redis</groupId>
<artifactId>testcontainers-redis</artifactId>
<version>${testcontainers.redis.version}</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springdoc</groupId>-->
<!-- <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>-->
<!-- <version>2.0.0</version>-->
<!-- </dependency>-->
</dependencies>

<repositories>
Expand Down Expand Up @@ -131,7 +137,7 @@
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
Expand Down
2 changes: 1 addition & 1 deletion demos/roms-hashes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand Down
2 changes: 1 addition & 1 deletion demos/roms-permits/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
<relativePath />
<!-- lookup parent from repository -->
</parent>
Expand Down
2 changes: 1 addition & 1 deletion demos/roms-vss/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.7</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand Down
59 changes: 23 additions & 36 deletions redis-om-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
<maven.test.source>17</maven.test.source>
<maven.test.target>17</maven.test.target>
<java.version>17</java.version>
<spring.version>3.1.7</spring.version>
<sdr.version>3.1.7</sdr.version>
<jedis.version>4.4.3</jedis.version>
<spring.version>3.2.0</spring.version>
<sdr.version>3.2.0</sdr.version>
<jedis.version>5.0.2</jedis.version>
<cdi>1.0</cdi>
<auto-service.version>1.0.1</auto-service.version>
<spring.test.version>6.0.15</spring.test.version>
<testcontainers.redis.version>1.6.4</testcontainers.redis.version>
<testcontainers.redis.junit.version>1.6.4</testcontainers.redis.junit.version>
<testcontainers.redis.version>2.0.1</testcontainers.redis.version>
<testcontainers.redis.junit.version>2.0.1</testcontainers.redis.junit.version>
<guava.version>33.0.0-jre</guava.version>
<ulid.version>5.2.2</ulid.version>
<lombok.version>1.18.30</lombok.version>
Expand All @@ -75,13 +75,20 @@
<assertj.version>3.24.2</assertj.version>
<elementary.version>2.0.0</elementary.version>
<gson.version>2.10.1</gson.version>
<djl.starter.version>0.20</djl.starter.version>
<djl.version>0.22.1</djl.version>
<djl.starter.version>0.23</djl.starter.version>
<djl.version>0.23.0</djl.version>
<junit-bom.version>5.10.1</junit-bom.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
Expand Down Expand Up @@ -131,11 +138,6 @@
</distributionManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
Expand All @@ -144,34 +146,20 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
<optional>false</optional>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>com.github.f4b6a3</groupId>
<artifactId>ulid-creator</artifactId>
Expand All @@ -180,7 +168,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
Expand Down Expand Up @@ -232,13 +219,11 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.test.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -248,17 +233,11 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.redis.testcontainers</groupId>
<groupId>com.redis</groupId>
<artifactId>testcontainers-redis</artifactId>
<version>${testcontainers.redis.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.redis.testcontainers</groupId>
<artifactId>testcontainers-redis-junit</artifactId>
<version>${testcontainers.redis.junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.karuslabs</groupId>
<artifactId>elementary</artifactId>
Expand All @@ -271,6 +250,12 @@
<version>${lombok.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -315,12 +300,14 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ private Optional<Field> createIndexedFieldForIdField(Class<?> cl, List<Field> fi
&& !idField.isAnnotationPresent(Searchable.class)
&& !idField.isAnnotationPresent(TagIndexed.class)
&& !idField.isAnnotationPresent(TextIndexed.class)
&& (fields.stream().noneMatch(f -> f.name.equals(idField.getName())))) {
&& (fields.stream().noneMatch(f -> getSchemaFieldName(f).equals(idField.getName())))) {
Class<?> idClass = idField.getType();
if (idField.getType().isPrimitive()) {
String cls = com.redis.om.spring.util.ObjectUtils.getTargetClassName(idClass.getName());
Expand Down Expand Up @@ -750,7 +750,6 @@ private IndexDefinition createIndexDefinition(Class<?> cl, IndexDefinition.Type

if (cl.isAnnotationPresent(Document.class)) {
Document document = cl.getAnnotation(Document.class);
index.setAsync(document.async());
Optional.ofNullable(document.filter()).filter(ObjectUtils::isNotEmpty).ifPresent(index::setFilter);
Optional.ofNullable(document.language()).filter(ObjectUtils::isNotEmpty).ifPresent(lang -> index.setLanguage(lang.getValue()));
Optional.ofNullable(document.languageField()).filter(ObjectUtils::isNotEmpty).ifPresent(index::setLanguageField);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import redis.clients.jedis.bloom.commands.CountMinSketchCommands;
import redis.clients.jedis.bloom.commands.CuckooFilterCommands;
import redis.clients.jedis.bloom.commands.TopKFilterCommands;
import redis.clients.jedis.json.RedisJsonCommands;
import redis.clients.jedis.json.commands.RedisJsonCommands;
import redis.clients.jedis.search.RediSearchCommands;

import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
public interface SearchOperations<K> {

String createIndex(Schema schema, IndexOptions options);
String createIndex(FTCreateParams params, List<SchemaField> fields);
SearchResult search(Query q);
SearchResult search(Query q, FTSearchParams params);
AggregationResult aggregate(AggregationBuilder q);
AggregationResult aggregate(AggregationBuilder q);
String cursorDelete(long cursorId);
AggregationResult cursorRead(long cursorId, int count);
String explain(Query q);
Expand All @@ -31,13 +32,13 @@ public interface SearchOperations<K> {
Long getSuggestionLength(String key);
String alterIndex(SchemaField... fields);
String setConfig(String option, String value);
Map<String, String> getConfig(String option);
Map<String, String> getIndexConfig(String option);
Map<String, Object> getConfig(String option);
Map<String, Object> getIndexConfig(String option);
String addAlias(String name);
String updateAlias(String name);
String deleteAlias(String name);
String updateSynonym(String synonymGroupId, String ...terms);
Map<String, List<String>> dumpSynonym();
Set<String> tagVals(String value);

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ public String createIndex(Schema schema, IndexOptions options) {
return search.ftCreate(index.toString(), options, schema);
}

@Override
public String createIndex(FTCreateParams params, List<SchemaField> fields) {
return search.ftCreate(index.toString(), params, fields);
}

@Override
public SearchResult search(Query q) {
return search.ftSearch(SafeEncoder.encode(index.toString()), q);
}

@Override
public SearchResult search(Query q, FTSearchParams params) {
return search.ftSearch(index.toString(), q.toString(), params);
Expand Down Expand Up @@ -83,7 +88,7 @@ public String dropIndexAndDocuments() {

@Override
public Long addSuggestion(String key, String suggestion) {
return search.ftSugAdd(key, suggestion, 1.0);
return search.ftSugAdd(key, suggestion, 1.0);
}

@Override
Expand Down Expand Up @@ -134,7 +139,7 @@ public List<Suggestion> getSuggestion(String key,String prefix) {
public Boolean deleteSuggestion(String key, String entry) {
return search.ftSugDel(key, entry);
}

@Override
public Long getSuggestionLength(String key) {
return search.ftSugLen(key);
Expand All @@ -151,12 +156,12 @@ public String setConfig(String option, String value) {
}

@Override
public Map<String,String> getConfig(String option) {
public Map<String,Object> getConfig(String option) {
return search.ftConfigGet(option);
}

@Override
public Map<String, String> getIndexConfig(String option) {
public Map<String, Object> getIndexConfig(String option) {
return search.ftConfigGet(index.toString(), option);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public RediSearchQuery(//
}
}
if (r != null && alias != null && !alias.isBlank()) {
r.setAlias(alias);
r.as(alias);
}
group.reduce(r);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public RedisEnhancedQuery(
}
}
if (r != null && alias != null && !alias.isBlank()) {
r.setAlias(alias);
r.as(alias);
}
group.reduce(r);
});
Expand Down
Loading

0 comments on commit 7ce9afd

Please sign in to comment.