连接服务端
该页面将向你展示如何从 Python 客户端连接 Milvus 服务端。
-
导入 pymilvus:
# Import pymilvus. >>> from milvus import Milvus, IndexType, MetricType, Status
-
使用以下任意一种方法连接 Milvus 服务端:
# Connect to the Milvus server. >>> milvus = Milvus(host='localhost', port='19530')
在上面的代码中,host
和port
都使用了默认值。你可以将其更改为自己设定的 IP 地址和端口。>>> milvus = Milvus(uri='tcp://localhost:19530')