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 #922

Merged
merged 1 commit into from
Aug 30, 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
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ grant_privilege(

Possible values:

- __Global__: System-wide objects, allowing the user to perform actions that affect all collections, users, or system-wide settings. When __object_type__ is set to __Global__, set __object_name__ to the wildcard (__*__), indicating all objects of the specified type.
- __Collection__: Collection-specific objects, allowing the user to perform actions such as creating indexes, loading data, inserting or deleting data, and querying data within a specific collection.
- __User__: Objects related to user management, allowing the user to manage credentials and roles for database users, such as updating user credentials or viewing user details.
- **Global**: System-wide objects, allowing the user to perform actions that affect all collections, users, or system-wide settings. When **object_type** is set to **Global**, set **object_name** to the wildcard (*****), indicating all objects of the specified type.

- **Collection**: Collection-specific objects, allowing the user to perform actions such as creating indexes, loading data, inserting or deleting data, and querying data within a specific collection.

- **User**: Objects related to user management, allowing the user to manage credentials and roles for database users, such as updating user credentials or viewing user details.

- **privilege** (*str*) -

Expand All @@ -47,9 +49,9 @@ grant_privilege(

**[REQUIRED]**

The name of the object to control access for. For example, if the object type is __Collection__, the object name is the name of a collection. If the object type is __User__, the object name is the name of a database user.
The name of the object to control access for. For example, if the object type is **Collection**, the object name is the name of a collection. If the object type is **User**, the object name is the name of a database user.

When __object_type__ is set to __Global__, set __object_name__ to the wildcard (__*__), indicating all objects of the specified type. For details, refer to the Relevant API column in the table on page [Users and Roles](https://milvus.io/docs/users_and_roles.md).
When **object_type** is set to **Global**, set **object_name** to the wildcard (*****), indicating all objects of the specified type. For details, refer to the Relevant API column in the table on page [Users and Roles](https://milvus.io/docs/users_and_roles.md).

- **db_name** (*str*) -

Expand Down Expand Up @@ -101,7 +103,7 @@ read_only_privileges = [
{"object_type": "Collection", "object_name": "quick_setup", "privilege": "Search"},
# Query permission on all collections
{"object_type": "Collection", "object_name": "*", "privilege": "Query"}
]
]

# 2. Create a role
client.create_role(role_name="read_only")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ revoke_privilege(

**[REQUIRED]**

The type of the object from which the privilege is being revoked.
The type of the object from which the privilege is being revoked.

Possible values:
- __Global__: System-wide objects, allowing the user to perform actions that affect all collections, users, or system-wide settings. When __object_type__ is set to __Global__, set object_name to the wildcard (__*__), indicating all objects of the specified type.
- __Collection__: Collection-specific objects, allowing the user to perform actions such as creating indexes, loading data, inserting or deleting data, and querying data within a specific collection.
- __User__: Objects related to user management, allowing the user to manage credentials and roles for database users, such as updating user credentials or viewing user details.

- **Global**: System-wide objects, allowing the user to perform actions that affect all collections, users, or system-wide settings. When **object_type** is set to **Global**, set **object_name** to the wildcard (*****), indicating all objects of the specified type.

- **Collection**: Collection-specific objects, allowing the user to perform actions such as creating indexes, loading data, inserting or deleting data, and querying data within a specific collection.

- **User**: Objects related to user management, allowing the user to manage credentials and roles for database users, such as updating user credentials or viewing user details.

- **privilege** (*str*) -

Expand All @@ -46,9 +49,9 @@ revoke_privilege(

**[REQUIRED]**

The name of the object to control access for. For example, if the object type is __Collection__, the object name is the name of a collection. If the object type is __User__, the object name is the name of a database user.
The name of the object to control access for. For example, if the object type is **Collection**, the object name is the name of a collection. If the object type is **User**, the object name is the name of a database user.

When __object_type__ is set to __Global__, set __object_name__ to the wildcard (__*__), indicating all objects of the specified type. For details, refer to the Relevant API column in the table on page [Users and Roles](https://milvus.io/docs/users_and_roles.md).
When **object_type** is set to **Global**, set **object_name** to the wildcard (*****), indicating all objects of the specified type. For details, refer to the Relevant API column in the table on page [Users and Roles](https://milvus.io/docs/users_and_roles.md).

- **db_name** (*str*) -

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ add_field(

</div>

- **is_clustering_key** (*bool*) -

Whether the current field serves as the clustering key. Each collection can have one partition key. You can also use the partition key as the clustering key. For details, refer to Clustering Compaction.

- **mmap_enabled** (*bool*) -

Whether Milvus maps the field data into memory instead of fully loading it. For details settings, refer to MMap-enabled Data Storage.

**RETURN TYPE:**

*[CollectionSchema](CollectionSchema.md)*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ create_collection(

Whether the primary field automatically increments upon data insertions into this collection.

The value defaults to **False**. Setting this to **True** makes the primary field automatically increment.
The value defaults to **False**. Setting this to **True** makes the primary field automatically increment. In this case, the primary field should not be included in the data to insert to avoid errors. The auto-generated IDs have a fixed length and cannot be altered.

This parameter is designed for the quick setup of a collection and will be ignored if **schema** is not **None**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ load_collection(

</div>

- **resource_groups** (*str[]*) -

The target resource groups of this operation.

- **load_fields** (*str[]*) -

The names of the fields to load.

If this parameter is left unspecified, Milvus loads all vector field indexes plus all scalar field data into memory. Setting this parameter makes Milvus load the data of the specified fields into memory, reducing memory usage and improving search performance.

- **skip_load_dynamic_field** (*bool*) -

Setting this to true makes Milvus skip loading the dynamic field, making it unavailable for filtering conditions and output fields for searches and queries.

- **timeout** (*float* | *None*) -

The timeout duration for this operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ load_partitions(

A list of the names of the partitions to load.

- **resource_groups** (*str[]*) -

The target resource groups of this operation.

- **load_fields** (*str[]*) -

The names of the fields to load.

If this parameter is left unspecified, Milvus loads all vector field indexes plus all scalar field data into memory. Setting this parameter makes Milvus load the data of the specified fields into memory, reducing memory usage and improving search performance.

- **skip_load_dynamic_field** (*bool*) -

Setting this to true makes Milvus skip loading the dynamic field, making it unavailable for filtering conditions and output fields for searches and queries.

- **timeout** (*float* | *None*)

The timeout duration for this operation. Setting this to **None** indicates that this operation timeouts when any response arrives or any error occurs.
Expand Down
7 changes: 0 additions & 7 deletions API_Reference/pymilvus/v2.4.x/MilvusClient/Vector/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,12 @@ delete(

You can set this parameter to an empty string to skip scalar filtering. To build a scalar filtering condition, refer to [Boolean Expression Rules](https://milvus.io/docs/boolean.md).

<<<<<<< Updated upstream
<div class="alert note">

When using filter expressions to delete entities, ensure the collection has been loaded. Otherwise, Milvus will return an error.

=======
<div class="admonition note">

<p><b>notes</b></p>

<p>When using filter expressions to delete entities, ensure the collection has been loaded. Otherwise, Milvus will return an error.</p>

>>>>>>> Stashed changes
</div>

- **partition_name** (*str* | *""*) -
Expand Down
8 changes: 4 additions & 4 deletions API_Reference/pymilvus/v2.4.x/MilvusClient/Vector/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ search(
This param is only used for range search for IVF-serial indexes, including **BIN_IVF_FLAT**, **IVF_FLAT**, **IVF_SQ8**, **IVF_PQ**, and **SCANN**. The value defaults to 1 and ranges from 1 to 65536.

During range search, the search process terminates early if the number of buckets with no valid range search results reaches the specified value. Increasing this parameter improves range search recall.

- **ignore_growing** (*str*) -

This option, when set, instructs the search to exclude data from growing segments. Utilizing this setting can potentially enhance search performance by focusing only on indexed and fully processed data.

- **ignore_growing** (*str*) -

Expand Down Expand Up @@ -130,6 +126,10 @@ search(

The value defaults to **-1**, indicating that Milvus skips rounding the calculated distances and returns the raw value.

- **page_retain_order** (*bool*) -

Whether to retain the order of the search result when `offset` is provided.

**RETURN TYPE:**

*list[dict]*
Expand Down
4 changes: 2 additions & 2 deletions API_Reference/pymilvus/v2.4.x/ORM/Collection/Collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ Collection(

The number of shards to create along with the creation of this collection.

The value defaults to **2**, indicating that two shards are to be created along with this collection.
The value defaults to **1**, indicating that one shard is to be created along with this collection.

<div class="admonition note">

<p><b>what is sharding?</b></p>

<p>Sharding refers to distributing write operations to different nodes to make the most of the parallel computing potential of a Milvus cluster for writing data.</p>
<p>By default, a collection contains two shards.</p>
<p>By default, a collection contains one shard.</p>

</div>

Expand Down
30 changes: 19 additions & 11 deletions API_Reference/pymilvus/v2.4.x/ORM/Collection/load.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ load(

The partitions of the current collection to load. If left unspecified, all partitions are to be loaded.

- **timeout** (*float* | *None*) -

The timeout duration for this operation. Setting this to **None** indicates that this operation timeouts when any response arrives or any error occurs.

- **replica_number** (*int*) -

The number of replicas to create. The value defaults to 1 and ranges from 1 to the number of query nodes available. Setting this to `1` indicates that segments in the current collection or any specified partitions are to be loaded onto one query node.
Expand All @@ -39,26 +43,30 @@ load(

</div>

- **timeout** (*float* | *None*) -
- **resource_groups** (*str[]*) **-**

The timeout duration for this operation. Setting this to **None** indicates that this operation timeouts when any response arrives or any error occurs.
A specific set of resource groups into which the current collection is to be loaded.

If left unspecified, the default resource group applies.

- **kwargs** -
<div class="admonition note">

- **_resource_groups** (*list*) -
<p><b>what is a resource group?</b></p>

A specific set of resource groups into which the current collection is to be loaded.
<p>A resource group can hold several or all of the query nodes in a Milvus instance.</p>
<p>Setting this parameter for this operation makes Milvus loads the current collection to the query nodes in the specified resource groups.</p>

</div>

If left unspecified, the default resource group applies.
- **load_fields** (*str[]*) -

<div class="admonition note">
The names of the fields to load.

<p><b>what is a resource group?</b></p>
If this parameter is left unspecified, Milvus loads all vector field indexes plus all scalar field data into memory. Setting this parameter makes Milvus load the data of the specified fields into memory, reducing memory usage and improving search performance.

<p>A resource group can hold several or all of the query nodes in a Milvus instance.</p>
<p>Setting this parameter for this operation makes Milvus loads the current collection to the query nodes in the specified resource groups.</p>
- **skip_load_dynamic_field** (*bool*) -

</div>
Setting this to true makes Milvus skip loading the dynamic field, making it unavailable for filtering conditions and output fields for searches and queries.

**RETURN TYPE:**

Expand Down
28 changes: 26 additions & 2 deletions API_Reference/pymilvus/v2.4.x/ORM/Collection/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,36 @@ search(

The timeout duration for this operation. Setting this to **None** indicates that this operation timeouts when any response arrives or any error occurs.

- **round_decimal** (int) -
- **round_decimal** (*int*) -

The number of decimal places that Milvus rounds the calculated distances to.

The value defaults to **-1**, indicating that Milvus skips rounding the calculated distances and returns the raw value.

- **consistency_level** (*str*) -

The consistency level used when Milvus searches within the specified collection.

If this parameter is not specified, the consistency level specified during the collection creation will be used. Specifying this parameter will override the one specified during collection creation.

Possible values are **Strong**, **Bounded**, **Eventually**, **Session**, and **Customized**.

- **page_retain_order** (*bool*) -

Whether to retain the order of the search result when `offset` is provided.

- **guarantee_timestamp** (*int*) -

The timestamp that Milvus uses as a reference during the search.

If this parameter is left unspecified, Milvus searches within all flushed entities. Setting this value makes Milvus searches within the entities flushed before the specified timestamp.

- **graceful_time** (*int*) -

A graceful period in seconds for the search.

Setting this value makes Milvus search within the entities flushed the specified seconds ago.

**RETURN TYPE:**

*SearchResult*
Expand Down Expand Up @@ -223,7 +247,7 @@ param = {
}
}

# Create a search iterator
# Create a search request
res = collection.search(
data=[[0.1,0.2,-0.3,-0.4,0.5]],
anns_field="vector",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ add_field(

</div>

- **is_clustering_key** (*bool*) -

Whether the current field serves as the clustering key. Each collection can have one partition key. You can also use the partition key as the clustering key. For details, refer to Clustering Compaction.

- **mmap_enabled** (*bool*) -

Whether Milvus maps the field data into memory instead of fully loading it. For details settings, refer to MMap-enabled Data Storage.

**RETURN TYPE:**

*[CollectionSchema](CollectionSchema.md)*
Expand Down
2 changes: 2 additions & 0 deletions API_Reference/pymilvus/v2.4.x/ORM/Connections/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ connect(
alias: str,
user: str | "",
password: str | "",

db_name: str | "default",

token: str | "",
**kwargs
)
Expand Down
26 changes: 17 additions & 9 deletions API_Reference/pymilvus/v2.4.x/ORM/Partition/load.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,30 @@ load(

The timeout duration for this operation. Setting this to **None** indicates that this operation timeouts when any response arrives or any error occurs.

- **kwargs** -
- **resource_groups** (*list*) -

- **_resource_groups** (*list*) -
A specific set of resource groups into which the current collection is to be loaded.

A specific set of resource groups into which the current collection is to be loaded.
If left unspecified, the default resource group applies.

If left unspecified, the default resource group applies.
<div class="admonition note">

<div class="admonition note">
<p><b>what is a resource group?</b></p>

<p><b>what is a resource group?</b></p>
<p>A resource group can hold several or all of the query nodes in a Milvus instance.</p>
<p>Setting this parameter for this operation makes Milvus loads the current collection to the query nodes in the specified resource groups.</p>

<p>A resource group can hold several or all of the query nodes in a Milvus instance.</p>
<p>Setting this parameter for this operation makes Milvus loads the current collection to the query nodes in the specified resource groups.</p>
</div>

</div>
- **load_fields** (*str[]*) -

The names of the fields to load.

If this parameter is left unspecified, Milvus loads all vector field indexes plus all scalar field data into memory. Setting this parameter makes Milvus load the data of the specified fields into memory, reducing memory usage and improving search performance.

- **skip_load_dynamic_field** (*bool*) -

Setting this to true makes Milvus skip loading the dynamic field, making it unavailable for filtering conditions and output fields for searches and queries.

**RETURN TYPE:**

Expand Down
2 changes: 1 addition & 1 deletion API_Reference/pymilvus/v2.4.x/ORM/Partition/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ param = {
}
}

# Create a search iterator
# Create a search request
res = partition.search(
data=[[0.1,0.2,-0.3,-0.4,0.5]],
anns_field="vector",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This operation creates a new resource group.
<p><b>what is a resource group?</b></p>

<p>A resource group can hold several or all of the query nodes in a Milvus instance. When you load a collection by calling load(), Milvus loads the data of the collection into certain query nodes.</p>
<p>There is a default resource group named <strong>__default_resource_group</strong> available in every Milvus instance that holds all its query nodes. </p>
<p>Use <strong>describe_resource_group()</strong> to check the actual number. If there are multiple query nodes available, consider creating resource groups and distributing the query nodes among them.</p>
<p>There is a default resource group named <strong>_<em>default</em>resource_group</strong> available in every Milvus instance that holds all its query nodes. </p>
<p>Use <strong>describe<em>resource</em>group()</strong> to check the actual number. If there are multiple query nodes available, consider creating resource groups and distributing the query nodes among them.</p>

</div>

Expand Down
Loading