milvus-logo
Star
0
Forks
0
Get Started

Load a collection

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

    Is this page helpful?
    On this page