BREAKING CHANGE - Change vector store initialize-schema to false
* Change default schema initialization of vector stores from `true` to `false.` Users need to explicitly opt-in for schema initialization by setting the `initialize-schema` property on the corresponding vector store. * Update integration tests * Update docs Fixes #907
This commit is contained in:
committed by
Mark Pollack
parent
edf943ec97
commit
50d34b8a48
@@ -40,7 +40,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringJUnitConfig
|
||||
@Testcontainers
|
||||
@TestPropertySource(properties = "spring.ai.vectorstore.chroma.store.collectionName=TestCollection")
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.chroma.store.collectionName=TestCollection",
|
||||
"spring.ai.vectorstore.chroma.initialize-schema=true" })
|
||||
class ChromaContainerConnectionDetailsFactoryTest {
|
||||
|
||||
@Container
|
||||
|
||||
@@ -40,7 +40,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringJUnitConfig
|
||||
@Testcontainers
|
||||
@TestPropertySource(properties = "spring.ai.vectorstore.chroma.store.collectionName=TestCollection")
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.chroma.store.collectionName=TestCollection",
|
||||
"spring.ai.vectorstore.chroma.initialize-schema=true" })
|
||||
class ChromaWithToken2ContainerConnectionDetailsFactoryTest {
|
||||
|
||||
@Container
|
||||
|
||||
@@ -40,7 +40,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringJUnitConfig
|
||||
@Testcontainers
|
||||
@TestPropertySource(properties = "spring.ai.vectorstore.chroma.store.collectionName=TestCollection")
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.chroma.store.collectionName=TestCollection",
|
||||
"spring.ai.vectorstore.chroma.initialize-schema=true" })
|
||||
class ChromaWithTokenContainerConnectionDetailsFactoryTest {
|
||||
|
||||
@Container
|
||||
|
||||
@@ -45,7 +45,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@Testcontainers
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.milvus.metricType=COSINE",
|
||||
"spring.ai.vectorstore.milvus.indexType=IVF_FLAT", "spring.ai.vectorstore.milvus.embeddingDimension=384",
|
||||
"spring.ai.vectorstore.milvus.collectionName=myTestCollection" })
|
||||
"spring.ai.vectorstore.milvus.collectionName=myTestCollection",
|
||||
"spring.ai.vectorstore.milvus.initialize-schema=true" })
|
||||
class MilvusContainerConnectionDetailsFactoryTest {
|
||||
|
||||
@Container
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
@SpringBootTest(properties = {
|
||||
"spring.ai.vectorstore.opensearch.index-name=" + OpenSearchContainerConnectionDetailsFactoryTest.DOCUMENT_INDEX,
|
||||
"spring.ai.vectorstore.opensearch.initialize-schema=true",
|
||||
"spring.ai.vectorstore.opensearch.mapping-json="
|
||||
+ OpenSearchContainerConnectionDetailsFactoryTest.MAPPING_JSON })
|
||||
@Testcontainers
|
||||
|
||||
@@ -43,7 +43,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringJUnitConfig
|
||||
@Testcontainers
|
||||
@TestPropertySource(properties = "spring.ai.vectorstore.qdrant.collectionName=test_collection")
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.qdrant.collectionName=test_collection",
|
||||
"spring.ai.vectorstore.qdrant.initialize-schema=true" })
|
||||
public class QdrantContainerConnectionDetailsFactoryTest {
|
||||
|
||||
@Container
|
||||
|
||||
@@ -43,7 +43,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringJUnitConfig
|
||||
@Testcontainers
|
||||
@TestPropertySource(properties = "spring.ai.vectorstore.qdrant.collectionName=test_collection")
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.qdrant.collectionName=test_collection",
|
||||
"spring.ai.vectorstore.qdrant.initialize-schema=true" })
|
||||
public class QdrantContainerWithApiKeyConnectionDetailsFactoryTest {
|
||||
|
||||
@Container
|
||||
|
||||
@@ -29,6 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringJUnitConfig
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.typesense.embeddingDimension=384",
|
||||
"spring.ai.vectorstore.typesense.initialize-schema=true",
|
||||
"spring.ai.vectorstore.typesense.collectionName=myTestCollection" })
|
||||
@Testcontainers
|
||||
class TypesenseContainerConnectionDetailsFactoryTest {
|
||||
|
||||
@@ -46,7 +46,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@TestPropertySource(properties = { "spring.ai.vectorstore.weaviate.filter-field.country=TEXT",
|
||||
"spring.ai.vectorstore.weaviate.filter-field.year=NUMBER",
|
||||
"spring.ai.vectorstore.weaviate.filter-field.active=BOOLEAN",
|
||||
"spring.ai.vectorstore.weaviate.filter-field.price=NUMBER" })
|
||||
"spring.ai.vectorstore.weaviate.filter-field.price=NUMBER",
|
||||
"spring.ai.vectorstore.weaviate.initialize-schema=true" })
|
||||
class WeaviateContainerConnectionDetailsFactoryTest {
|
||||
|
||||
@Container
|
||||
|
||||
Reference in New Issue
Block a user