llama-stack icon indicating copy to clipboard operation
llama-stack copied to clipboard

feat: Implement keyword search in milvus

Open varshaprasad96 opened this issue 5 months ago • 5 comments

What does this PR do?

This PR adds the keyword search implementation for Milvus. Along with the implementation for remote Milvus, the tests require us to start a Milvus containers locally.

In order to verify the implementation, run:

docker compose -f tests/unit/providers/vector_io/remote/docker-compose.milvus.yml up -d

Followed by:

pytest tests/unit/providers/vector_io/remote/test_milvus.py -v -s --tb=short --disable-warnings --asyncio-mode=auto

On running the above, the results are:

========================================= test session starts =========================================
platform darwin -- Python 3.10.16, pytest-8.3.5, pluggy-1.5.0 -- /Users/vnarsing/miniconda3/envs/stack-client/bin/python
cachedir: .pytest_cache
rootdir: /Users/vnarsing/go/src/github/meta-llama/llama-stack
configfile: pyproject.toml
plugins: anyio-4.8.0, asyncio-0.26.0
asyncio: mode=auto, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 4 items                                                                                     

tests/unit/providers/vector_io/remote/test_milvus.py::test_add_chunks PASSED
tests/unit/providers/vector_io/remote/test_milvus.py::test_query_chunks_vector PASSED
tests/unit/providers/vector_io/remote/test_milvus.py::test_query_chunks_keyword_search PASSED
tests/unit/providers/vector_io/remote/test_milvus.py::test_query_chunks_keyword_search_k_greater_than_results PASSED

========================================== 4 passed in 8.62s ==========================================

varshaprasad96 avatar May 22 '25 22:05 varshaprasad96