Skip to main content

Connect for Lake-Search

Use a project endpoint when you want to run Search in Lake-Search or query workloads with compute from a Lake-Search cluster.

Note

This page is for connecting to a project endpoint for Search in Lake-Search. If you want to connect to a Free, Serverless, or Dedicated vector database, see Connect to Serving Clusters.

Endpoint format​

Endpoint typeEndpoint patternUse for
Project endpointhttps://{project-id}.{region}.api.zillizcloud.comData import, batch search, query, get, search, and hybrid search through a Lake-Search cluster.

Before you begin​

  • Get the project endpoint from the Zilliz Cloud console.

  • Get the Lake-Search cluster ID that should provide compute resources for the search workload.

  • Create an API key with sufficient permissions for the project and target data.

  • Install a Milvus SDK for your use case. For details, refer to Install SDKs.

Connect to a Project Endpoint​

Create a MilvusClient with the project endpoint and specify the Lake-Search cluster that should serve the request.

python
from pymilvus import MilvusClient

client = MilvusClient(
uri="https://{project-id}.{region}.api.zillizcloud.com",
token="YOUR_API_KEY",
)

Create a Search Session​

Use a session object to attach your operations to the Lake-Search cluster.

python
session = client.session(cluster_id="inxx-xxxxxxxxxxxxxxx")

Then use the session to run DQL operations such as query, get, search, and hybrid_search.

python
results = session.search(
collection_name="my_collection",
data=[[0.1, 0.2, 0.3, 0.4]],
anns_field="vector",
limit=10,
)

print(results)

Authentication​

When connecting to a project endpoint, use a valid API key as the authentication token.

Cluster credentials in username:password format are for vector database endpoints. For Search in Lake-Search through a project endpoint, use an API key with the required project permissions.

When to Use This Connection​

Use the project endpoint for batch processing, exploration, validation, experiments, and other workloads where Lake-Search is a better fit than always-on serving.

For production applications that require the full Collection API and always-on low-latency serving, connect to a Free, Serverless, or Dedicated vector database instead. See Connect to Serving Clusters for the vector database endpoint formats and connection examples.