LoadCollection()
Loads collection data into query-node memory.
pub async fn load_collection(&self, request: LoadCollectionRequest) -> Result<()>
Request Syntax
let request = LoadCollectionRequest::builder()
.collection_name("books")
.replica_number(1)
.build()?;
REQUEST FIELDS:
database_name: Option<String>Name of the target database; uses the default database when empty.
collection_name: StringName of the collection to load. Required.
sync: boolWhether to wait for the load to complete before returning. Defaults to
true. Withfalse, the method returns after the load request is accepted.replica_number: i32Number of replicas to load. Defaults to
1.timeout_ms: i64Overall loading wait timeout in milliseconds; values less than or equal to zero wait indefinitely. Defaults to
60000.refresh: boolWhether to refresh the loaded view. Defaults to
false.load_fields: Vec<String>Subset of fields to load.
skip_load_dynamic_field: boolWhether to skip loading the dynamic field. Defaults to
false.resource_groups: Vec<String>Resource groups that host the loaded replicas.
load_priority: Option<String>Load priority forwarded as the
load_priorityload param, such aslow.
RETURN TYPE:
Result<()>
RETURNS:
Returns an empty result indicating success. Returns Error on failure.
Example
let request = LoadCollectionRequest::builder()
.collection_name("books")
.replica_number(1)
.build()?;
client.load_collection(request).await?;