|
|
@@ -0,0 +1,18 @@
|
|
|
+"""
|
|
|
+除 ANN 搜索外,Milvus 还支持通过查询过滤元数据。本页将介绍如何使用查询、获取和查询迭代器来执行元数据过滤。
|
|
|
+https://milvus.io/docs/zh/get-and-scalar-query.md
|
|
|
+"""
|
|
|
+
|
|
|
+from pymilvus import MilvusClient
|
|
|
+client = MilvusClient(
|
|
|
+ uri="http://192.168.92.61:19530",
|
|
|
+)
|
|
|
+client.use_database("lq_db")
|
|
|
+res = client.query(
|
|
|
+ collection_name="rag_parent_hybrid",
|
|
|
+ filter="parent_id == '02267e1d-11d7-4a3d-b53f-e205edd6758f'",
|
|
|
+ output_fields=["text"],
|
|
|
+
|
|
|
+)
|
|
|
+
|
|
|
+print(res)
|