Redis store: add default index and prefix values for auto-conf
This commit is contained in:
@@ -27,12 +27,12 @@ public class RedisVectorStoreProperties {
|
||||
|
||||
private String uri = "redis://localhost:6379";
|
||||
|
||||
private String index;
|
||||
private String index = "default-index";
|
||||
|
||||
private String prefix;
|
||||
private String prefix = "default:";
|
||||
|
||||
public String getUri() {
|
||||
return uri;
|
||||
return this.uri;
|
||||
}
|
||||
|
||||
public void setUri(String uri) {
|
||||
@@ -40,7 +40,7 @@ public class RedisVectorStoreProperties {
|
||||
}
|
||||
|
||||
public String getIndex() {
|
||||
return index;
|
||||
return this.index;
|
||||
}
|
||||
|
||||
public void setIndex(String name) {
|
||||
@@ -48,7 +48,7 @@ public class RedisVectorStoreProperties {
|
||||
}
|
||||
|
||||
public String getPrefix() {
|
||||
return prefix;
|
||||
return this.prefix;
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix) {
|
||||
|
||||
@@ -28,8 +28,8 @@ class RedisVectorStorePropertiesTests {
|
||||
void defaultValues() {
|
||||
var props = new RedisVectorStoreProperties();
|
||||
assertThat(props.getUri()).isEqualTo("redis://localhost:6379");
|
||||
assertThat(props.getIndex()).isNull();
|
||||
assertThat(props.getPrefix()).isNull();
|
||||
assertThat(props.getIndex()).isEqualTo("default-index");
|
||||
assertThat(props.getPrefix()).isEqualTo("default:");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user