Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs #2790

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions site/en/userGuide/manage-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,45 @@ $ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/get_load_state" \
# }
```

### Load a collection partially (Public Preview)

<div class="alert note">

This feature is currently in public preview. The API and functionality may change in the future.

</div>

Upon receiving your load request, Milvus loads all vector field indexes and all scalar field data into memory. If some fields are not to be involved in searches and queries, you can exclude them from loading to reduce memory usage, improving search performance.

<div class="language-python">

```python
# 7. Load the collection
client.load_collection(
collection_name="customized_setup_2",
load_fields=["my_id", "my_vector"] # Load only the specified fields
skip_load_dynamic_field=True # Skip loading the dynamic field
)

res = client.get_load_state(
collection_name="customized_setup_2"
)

print(res)

# Output
#
# {
# "state": "<LoadState: Loaded>"
# }
```

Note that only the fields listed in `load_fields` can be used as filtering conditions and output fields in searches and queries. You should always include the primary key in the list. The field names excluded from loading will not be available for filtering or output.

You can use `skip_load_dynamic_field=True` to skip loading the dynamic field. Milvus treats the dynamic field as a single field, so all the keys in the dynamic field will be included or excluded together.

</div>

### Release a collection

<div class="language-python">
Expand Down
16 changes: 16 additions & 0 deletions site/en/userGuide/manage-partitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,22 @@ console.log(res)
//
```

To load specified fields in one or more partitions, do as follows:

```python
client.load_partitions(
collection_name="quick_setup",
partition_names=["partitionA"],
load_fields=["id", "vector"],
skip_load_dynamic_field=True
)
```

Note that only the fields listed in `load_fields` can be used as filtering conditions and output fields in searches and queries. You should always include the primary key in the list. The field names excluded from loading will not be available for filtering or output.

You can use `skip_load_dynamic_field=True` to skip loading the dynamic field. Milvus treats the dynamic field as a single field, so all the keys in the dynamic field will be included or excluded together.


### Release Partitions

<div class="language-python">
Expand Down