github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/docs/load_collection.md (about)

     1  # Load Collection
     2  
     3  API to load collection by name.
     4  
     5  ## Parameters
     6  
     7  | Parameter    | Description                                                  | Type                     |
     8  | ------------ | ------------------------------------------------------------ | ------------------------ |
     9  | `ctx`        | Context to control API invocation process.                    | context.Context          |
    10  | `name`       | Name of the collection to load.                               | String                   |
    11  | `async`      | Switch value of the sync/async behavior. </br>Note: the deadline of context is not applied in sync load. | Boolean |
    12  
    13  
    14  
    15  ## Response
    16  
    17  `err`: error in the process (if any). Possible errors are listed below:
    18  
    19    - `ErrClientNotReady`, error that the client is not connected.
    20  
    21    - `ErrCollectionNotExists`, error that the collection with the specified name does not exist.
    22  
    23    - error that API invocation failed.
    24  
    25  ## Example
    26  
    27  ```go
    28  ctx := context.Background()
    29  // cli is a valid Client instance, assume test collection exists
    30  err := cli.LoadCollection(ctx, "TestCollection", false)
    31  // handles the error not nil
    32  ```