Feat: Add support for dynamic Milvus search parameters (radius, range_filter) #5274
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.
Summary
Adds support for
radiusandrange_filterparameters in Milvus vector database searches, allowing users to fine-tune search behavior at runtime by specifying similarity ranges.Changes:
search_paramsparameter to 4 search methods:search(),async_search(),hybrid_search(),async_hybrid_search()radius(outer boundary) andrange_filter(inner boundary)Fixes #5173
Type of change
Checklist
./scripts/format.shand./scripts/validate.sh)Changes Made
Modified
libs/agno/agno/vectordb/milvus/milvus.pyto acceptsearch_paramsdictionary in:search()/async_search()- Parameters passed directly to Milvus clienthybrid_search()/async_hybrid_search()- Parameters merged into dense/sparse search configsAdded tests in
libs/agno/tests/unit/vectordb/test_milvusdb.py:test_search_with_radius_and_range_filter()- Tests sync search with parameterstest_async_search_with_search_params()- Tests async search with parametersUsage Example
Backward Compatibility
search_paramsis optional (defaults toNone)Additional Notes
limitif constraints are strictsearch_paramsis not provided