spring-projects / spring-ai

An Application Framework for AI Engineering
https://docs.spring.io/spring-ai/reference/1.0-SNAPSHOT/index.html
Apache License 2.0
2.51k stars 602 forks source link

Milvus similarity search has fixed SEARCH_OUTPUT_FIELDS and EMBEDDING_FIELD_NAME #278

Open siddharthshankarpaul opened 5 months ago

siddharthshankarpaul commented 5 months ago

Bug description Can't do similarity search with different columns.

see line 338 and 341 https://github.com/spring-projects/spring-ai/blob/9381ab609f40da038e85405586686c201f03c714/vector-stores/spring-ai-milvus-store/src/main/java/org/springframework/ai/vectorstore/MilvusVectorStore.java#L325-L341

Environment Spring AI version: 0.8.0 Java version: 17 vector store: Milvus (zilliz cloud)

Steps to reproduce Create a collection with columns other than [doc_id, content, metadata]. Now try to do similarity search.

Expected behavior SearchRequest should provide way to override the default output params.

Note: EMBEDDING_FIELD_NAME = embedding is also fixed.

markpollack commented 5 months ago

maybe related to search options in https://github.com/spring-projects/spring-ai/pull/203