Repository navigation
feat: Add BM25 field tags to the Milvus online store - #7144
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7144 +/- ##
==========================================
+ Coverage 52.32% 52.35% +0.02%
==========================================
Files 459 459
Lines 58095 58131 +36
Branches 8560 8568 +8
==========================================
+ Hits 30397 30432 +35
Misses 25614 25614
- Partials 2084 2085 +1
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
The milvus.analyzer_params and milvus.enable_match field tags set the analyzer and TEXT_MATCH on a String feature when Feast creates the collection. Feast does not query the tokens; clients that query Milvus directly can. Co-authored-by: jonasfagerlund <jonashfagerlund@gmail.com> Signed-off-by: jonasfagerlund <jonashfagerlund@gmail.com> Signed-off-by: jiwidi <fhjaime96@gmail.com>
milvus.bm25 on a String feature makes Feast add a sparse output, a BM25 function and its index when it creates the collection, and milvus.bm25_index_params sets that index's build parameters. Writes leave the output to Milvus, and searches name the dense vector field, which Milvus can no longer infer once the collection has a BM25 output. Co-authored-by: jonasfagerlund <jonashfagerlund@gmail.com> Signed-off-by: jonasfagerlund <jonashfagerlund@gmail.com> Signed-off-by: jiwidi <fhjaime96@gmail.com>
ntkathole
force-pushed
the
feat/milvus-bm25-tags
branch
from
November 13, 2026 09:31
32fdb65 to
073d0e1
Compare
franciscojavierarceo
approved these changes
Nov 13, 2026
Signed-off-by: jiwidi <fhjaime96@gmail.com>
ntkathole
approved these changes
Nov 13, 2026
5 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Builds on #7143, which adds text analysis tags. A
Stringfeature can now declare a BM25index, which Feast creates with the collection:
milvus.bm25: "true"adds aSPARSE_FLOAT_VECTORfield<field>_bm25, a BM25 function<field>_bm25_fnand aSPARSE_INVERTED_INDEXbm25_index_<field>. Names are derived from thefield, as for
scalar_index_<field>andvector_index_<field>.milvus.bm25_index_paramspasses a JSON object of build parameters to that index.<field>_bm25to Milvus: PyMilvus rejects rows that carry a function output._placeholder_vector.retrieve_online_documents_v2now names the only dense vector field evenwhen it is not a requested feature. Before, Feast passed no
anns_fieldand Milvus inferredit, which fails with "multiple anns_fields exist" once the collection also has a BM25 output.
No behaviour change for collections without one.
follow-up can add BM25 and hybrid search to
retrieve_online_documents_v2.without the index by the missing-index warning.
Which issue(s) this PR fixes:
N/A
Checks
git commit -s)Testing Strategy
Unit tests
Integration tests
Manual tests
Testing is not required for this change
Unit: the created output, function, index and build params; no placeholder; validation;
writes and re-writes through a fresh store on Milvus Lite (fails without the write change);
the named
anns_field(fails without the retrieval change).Integration (
test_milvus_remote.py, against Milvus 2.5.27, 2.6.27 and 3.0.2): the server stores theindex params, writes succeed, and a BM25 search on
<field>_bm25finds the row.Milvus Lite does not reproduce the
anns_fieldambiguity, so the unit test checks the argumentFeast passes.
Misc
Stacked on #7143, whose commit is included here until it merges; review the last commit.
Written with @jonasfagerlund, who is a co-author of the commit.