- Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
It would be great to make metadataFieldsToFilter of MongoDBVectorStoreConfig configurable from properties
Expected Behavior
To define in application.yaml
vectorstore: mongodb: metadata-fields-to-filter: - fieldA - fieldB Current Behavior
You have to define it programmatically:
@Bean public MongoDBAtlasVectorStore vectorStore(MongoTemplate mongoTemplate, EmbeddingModel embeddingModel) { MongoDBVectorStoreConfig config = MongoDBVectorStoreConfig.builder() .withCollectionName("custom_vector_store") .withVectorIndexName("custom_vector_index") .withPathName("custom_embedding_path") .withMetadataFieldsToFilter(List.of("author", "year")) .build(); return new MongoDBAtlasVectorStore(mongoTemplate, embeddingModel, config, true); }