change redis vector store property index to index name (#2517)
Signed-off-by: jonghoon park <dev@jonghoonpark.com>
This commit is contained in:
@@ -74,7 +74,7 @@ public class RedisVectorStoreAutoConfiguration {
|
||||
.observationRegistry(observationRegistry.getIfUnique(() -> ObservationRegistry.NOOP))
|
||||
.customObservationConvention(customObservationConvention.getIfAvailable(() -> null))
|
||||
.batchingStrategy(batchingStrategy)
|
||||
.indexName(properties.getIndex())
|
||||
.indexName(properties.getIndexName())
|
||||
.prefix(properties.getPrefix())
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -30,16 +30,16 @@ public class RedisVectorStoreProperties extends CommonVectorStoreProperties {
|
||||
|
||||
public static final String CONFIG_PREFIX = "spring.ai.vectorstore.redis";
|
||||
|
||||
private String index = "default-index";
|
||||
private String indexName = "default-index";
|
||||
|
||||
private String prefix = "default:";
|
||||
|
||||
public String getIndex() {
|
||||
return this.index;
|
||||
public String getIndexName() {
|
||||
return this.indexName;
|
||||
}
|
||||
|
||||
public void setIndex(String name) {
|
||||
this.index = name;
|
||||
public void setIndexName(String indexName) {
|
||||
this.indexName = indexName;
|
||||
}
|
||||
|
||||
public String getPrefix() {
|
||||
|
||||
@@ -29,17 +29,17 @@ class RedisVectorStorePropertiesTests {
|
||||
@Test
|
||||
void defaultValues() {
|
||||
var props = new RedisVectorStoreProperties();
|
||||
assertThat(props.getIndex()).isEqualTo("default-index");
|
||||
assertThat(props.getIndexName()).isEqualTo("default-index");
|
||||
assertThat(props.getPrefix()).isEqualTo("default:");
|
||||
}
|
||||
|
||||
@Test
|
||||
void customValues() {
|
||||
var props = new RedisVectorStoreProperties();
|
||||
props.setIndex("myIdx");
|
||||
props.setIndexName("myIdx");
|
||||
props.setPrefix("doc:");
|
||||
|
||||
assertThat(props.getIndex()).isEqualTo("myIdx");
|
||||
assertThat(props.getIndexName()).isEqualTo("myIdx");
|
||||
assertThat(props.getPrefix()).isEqualTo("doc:");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user