Skip to content

feat: Add text analysis tags to the Milvus online store - #7143

Closed
jiwidi wants to merge 2 commits into
feast-dev:masterfrom
jiwidi:feat/milvus-text-analysis-tags
Closed

jiwidi wants to merge 2 commits into
feast-dev:masterfrom
jiwidi:feat/milvus-text-analysis-tags

Conversation

@jiwidi

@jiwidi jiwidi commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds two field tags so the Milvus online store can set up text analysis on a String feature when
it creates a collection, in the same way milvus.index declares scalar indexes (#7120):

Field(
    name="title",
    dtype=String,
    tags={
        "milvus.analyzer_params": '{"tokenizer": "whitespace"}',
        "milvus.enable_match": "true",
    },
),
  • milvus.analyzer_params: JSON object with the field's analyzer. Turns on enable_analyzer.
  • milvus.enable_match: "true" builds the token index that Milvus TEXT_MATCH filters need.
  • Both apply only to String features and need Milvus 2.5 or later.
  • Feast does not query the tokens: Feast filters have no TEXT_MATCH operator and
    retrieve_online_documents_v2 still filters a query_string with LIKE. Clients that query
    the collection directly can use them. A follow-up will add BM25 field tags on top of the
    analyzer.
  • Like the other creation-time tags, the settings apply only when Feast creates a collection.
    Unlike them, Feast does not compare them with an existing collection or warn when they differ.
  • _nullable_tag becomes _boolean_tag(field, tag) so both boolean tags share one parser and
    error message.

Which issue(s) this PR fixes:

N/A

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests

  • Integration tests

  • Manual tests

  • Testing is not required for this change

  • Unit: the created schema per tag combination, and validation (non-String feature, invalid
    boolean, analyzer JSON that is not an object).

  • Integration (test_milvus_remote.py, against Milvus 2.5.27, 2.6.27 and 3.0.2): a whitespace analyzer
    keeps wool-blend as one token, so TEXT_MATCH finds wool-blend and not wool.

  • Milvus Lite accepts both tags but does not apply them (its TEXT_MATCH always uses the standard
    analyzer), so only the server tests cover the behaviour.

Misc

Milvus 2.6 makes new rows visible to TEXT_MATCH about 2 seconds after the write, even with
Strong consistency, so the integration test retries that query.

Written with @jonasfagerlund, who is a co-author of the commit. A BM25 PR builds on this one.

@jiwidi
jiwidi requested a review from a team as a code owner November 12, 2026 15:20
@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.33%. Comparing base (021e9af) to head (e6d4fdb).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7143   +/-   ##
=======================================
  Coverage   52.32%   52.33%           
=======================================
  Files         459      459           
  Lines       58095    58109   +14     
  Branches     8560     8564    +4     
=======================================
+ Hits        30397    30410   +13     
  Misses      25614    25614           
- Partials     2084     2085    +1     
Flag Coverage Δ
go-feature-server 30.96% <ø> (ø)
python-unit 53.83% <100.00%> (+0.01%) ⬆️
Files with missing lines Coverage Δ
.../infra/online_stores/milvus_online_store/milvus.py 88.90% <100.00%> (+0.22%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 021e9af...e6d4fdb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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>
@ntkathole
ntkathole force-pushed the feat/milvus-text-analysis-tags branch from 69b54e2 to e6d4fdb Compare November 13, 2026 09:30
@ntkathole

Copy link
Copy Markdown
Member

@jiwidi please resolve the conflicts

@jiwidi jiwidi closed this Nov 13, 2026
@jiwidi jiwidi reopened this Nov 13, 2026
…analysis-tags

Signed-off-by: jiwidi <fhjaime96@gmail.com>
@jiwidi

jiwidi commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

changes went in together in a extra commit of #7144 closing this one now thanks @ntkathole

@jiwidi jiwidi closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants