milvus-logo
Star
0
Forks
0
快速开始

Load a collection

Milvus Docs 需要你的帮助

本文档暂时没有中文版本,欢迎你成为社区贡献者,协助中文技术文档的翻译。
你可以通过页面右边的 编辑 按钮直接贡献你的翻译。更多详情,参考 贡献指南。如需帮助,你可以 提交 GitHub Issue

This topic describes how to load the collection to memory before a search or a query. All search and query operations within Milvus are executed in memory.

from pymilvus import Collection
collection = Collection("book")      # Get an existing collection.
collection.load()
await milvusClient.collectionManager.loadCollection({
  collection_name: "book",
});
err := milvusClient.LoadCollection(
    context.Background(),   // ctx
    "book",                 // CollectionName
    false                   // async
    )
if err != nil {
    log.Fatal("failed to load collection:", err.Error())
}
milvusClient.loadCollection(
        LoadCollectionParam.newBuilder()
                .withCollectionName("book")
                .build());
load -c book
Parameter Description
partition_name (optional) Name of the partition to load.
Parameter Description
collection_name Name of the collection to load.
Parameter Description
ctx Context to control API invocation process.
CollectionName Name of the collection to load.
async Switch to control sync/async behavior. The deadline of context is not applied in sync load.
Parameter Description
CollectionName Name of the collection to load.
Option Description
-c Name of the collection to load.
-p (Optional/Multiple) The name of the partition to load.

What's next

    该页面是否对你有帮助?
    本页目录