spring-projects / spring-projects/spring-ai
Vector store support similarity search using vectors 支持使用向量进行相似度搜索
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 5
Description
Support the direct use of vectors for similarity search instead of only conducting similarity search after embedding the query text.
使VectorStore支持直接使用向量进行相似度搜索,而非仅可使用文本嵌入进行搜索。
Expected Behavior
Like in Milvus' documentation: https://milvus.io/docs/single-vector-search.md
像Miluvs的文档中的:
FloatVec queryVector = new FloatVec(new float[]{0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f});
SearchReq searchReq = SearchReq.builder()
.data(Collections.singletonList(queryVector)) // use vectors
.topK(3)
.build();
Current Behavior
Only text search is available, but the text is then embedded and searched as a vector
只可使用文本搜索,而文本又经过嵌入后以向量进行搜索。
Context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with vector-stores/spring-ai-milvus-store/src/main/java/org/springframework/ai/vectorstore/milvus/MilvusVectorStore.java at the behavior around line 354. Compare the current text-search flow with the Milvus vector-search example in the issue, then determine the API and implementation changes needed so callers can search with vectors directly while retaining text search.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100