Skip to content

feat(vectors): support sparse vectors in Milvus - #1362

Merged
zhenghaoz merged 8 commits into
gorse-io:masterfrom
zhangzhenghao:feat/sparse-vector
Aug 13, 2026
Merged

feat(vectors): support sparse vectors in Milvus#1362
zhenghaoz merged 8 commits into
gorse-io:masterfrom
zhangzhenghao:feat/sparse-vector

Conversation

@zhangzhenghao

@zhangzhenghao zhangzhenghao commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • represent dense and sparse vectors with one Vector type using Values and optional Indices
  • update QueryVectors to accept a Vector query
  • add shared sparse-vector lifecycle coverage for collection creation, insertion, querying, counting, timestamp deletion, and collection deletion
  • implement sparse-vector collections, inserts, and queries for Milvus/Zilliz
  • skip the shared sparse test explicitly in backends that do not support it yet

Tests

  • TMPDIR=/mnt/openclaw/tmp/gorse-sparse-vector go test ./storage/vectors -count=1
  • TMPDIR=/mnt/openclaw/tmp/gorse-sparse-vector go test ./worker ./master -run '^$' -count=1
  • go vet ./storage/vectors ./worker ./master
  • MILVUS_URI=milvus://127.0.0.1:19530 TMPDIR=/mnt/openclaw/tmp/gorse-sparse-vector go test ./storage/vectors -run '^TestMilvus$' -count=1

The Milvus suite was verified against milvusdb/milvus:v2.6.9.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.38298% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.09%. Comparing base (261a018) to head (c65c84e).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
storage/vectors/milvus.go 0.00% 42 Missing ⚠️
storage/vectors/xvec.go 74.56% 26 Missing and 3 partials ⚠️
storage/vectors/qdrant.go 86.27% 4 Missing and 3 partials ⚠️
master/tasks.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1362      +/-   ##
==========================================
- Coverage   72.41%   72.09%   -0.33%     
==========================================
  Files          94       94              
  Lines       18415    18608     +193     
==========================================
+ Hits        13336    13416      +80     
- Misses       3693     3771      +78     
- Partials     1386     1421      +35     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zhangzhenghao zhangzhenghao changed the title feat(vectors): add sparse vector indices feat(vectors): support sparse vectors in Milvus Aug 13, 2026
@zhenghaoz
zhenghaoz merged commit e57c32e into gorse-io:master Aug 13, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants