Skip to content

Commit 7cd05f4

Browse files
jitokimleijendary
authored andcommitted
Remove redundant condition in RedisVectorStore
- Fix Javadoc typo: change 'algorithmto use' to 'algorithm to use' Signed-off-by: jitokim <[email protected]> Signed-off-by: leijendary <[email protected]>
1 parent b19ff99 commit 7cd05f4

File tree

1 file changed

+3
-3
lines changed
  • vector-stores/spring-ai-redis-store/src/main/java/org/springframework/ai/vectorstore

1 file changed

+3
-3
lines changed

vector-stores/spring-ai-redis-store/src/main/java/org/springframework/ai/vectorstore/RedisVectorStore.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
* @author Eddú Meléndez
8282
* @author Thomas Vitale
8383
* @author Soby Chacko
84+
* @author Jihoon Kim
8485
* @see VectorStore
8586
* @see RedisVectorStoreConfig
8687
* @see EmbeddingModel
@@ -335,8 +336,7 @@ public VectorStoreObservationContext.Builder createObservationContextBuilder(Str
335336
.withCollectionName(this.config.indexName)
336337
.withDimensions(this.embeddingModel.dimensions())
337338
.withFieldName(this.config.embeddingFieldName)
338-
.withSimilarityMetric(
339-
"COSINE".equals(DEFAULT_DISTANCE_METRIC) ? VectorStoreSimilarityMetric.COSINE.value() : "");
339+
.withSimilarityMetric(VectorStoreSimilarityMetric.COSINE.value());
340340

341341
}
342342

@@ -467,7 +467,7 @@ public Builder withEmbeddingFieldName(String name) {
467467
}
468468

469469
/**
470-
* Configures the Redis vector algorithmto use.
470+
* Configures the Redis vector algorithm to use.
471471
* @param algorithm the vector algorithm to use
472472
* @return this builder
473473
*/

0 commit comments

Comments
 (0)