Skip to content

The agent engineering platform.

docs: Update Milvus documentation to correctly show how to filter in similarity_search (#27723)

Martin Gullbrandson8a5807a6b4a9
diff --git a/docs/docs/integrations/vectorstores/milvus.ipynb b/docs/docs/integrations/vectorstores/milvus.ipynb
index 34bda120d8..2cbc8d4e97 100644
--- a/docs/docs/integrations/vectorstores/milvus.ipynb
+++ b/docs/docs/integrations/vectorstores/milvus.ipynb
@@ -314,7 +314,7 @@
"results = vector_store.similarity_search(\n",
" \"LangChain provides abstractions to make working with LLMs easy\",\n",
" k=2,\n",
- " filter={\"source\": \"tweet\"},\n",
+ " expr='source == \"tweet\"',\n",
")\n",
"for res in results:\n",
" print(f\"* {res.page_content} [{res.metadata}]\")"
@@ -346,7 +346,7 @@
],
"source": [
"results = vector_store.similarity_search_with_score(\n",
- " \"Will it be hot tomorrow?\", k=1, filter={\"source\": \"news\"}\n",
+ " \"Will it be hot tomorrow?\", k=1, expr='source == \"news\"'\n",
")\n",
"for res, score in results:\n",
" print(f\"* [SIM={score:3f}] {res.page_content} [{res.metadata}]\")"