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
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public RedisVectorStore vectorStore(EmbeddingModel embeddingModel, RedisVectorSt
.observationRegistry(observationRegistry.getIfUnique(() -> ObservationRegistry.NOOP))
.customObservationConvention(customObservationConvention.getIfAvailable(() -> null))
.batchingStrategy(batchingStrategy)
.indexName(properties.getIndex())
.indexName(properties.getIndexName())
.prefix(properties.getPrefix())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:");
}

Expand Down