Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
Signed-off-by: AnthonyTsu1984 <[email protected]>
  • Loading branch information
AnthonyTsu1984 committed Oct 23, 2024
1 parent b21ff82 commit 307db6c
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 223 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,29 @@ grantPrivilege(data): Promise<ResStatus>

**[REQUIRED]**

The type of the object for which the privilege is being assigned.
The type of object for which the privilege is to be assigned.

Possible values:

- __Global__: System-wide objects, allowing the user to perform actions that affect all collections, users, or system-wide settings. When __object__ is set to __Global__, set __objectName__ 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.
Possible values are as follows:

- **Global**

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

- **Collection**

Collection-specific objects that allow 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 that allow the user to manage credentials and roles for database users, such as updating user credentials or viewing user details.

- **objectName** (*string*) -

**[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__ is set to __Global__, set __objectName__ 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** is set to **Global**, set **objectName** 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).

- **privilegeName** (*string*) -

Expand Down Expand Up @@ -91,8 +99,9 @@ This method returns a promise that resolves to a **ResStatus** object.
```java
milvusClient.grantPrivilege({
roleName: 'roleName',
object: 'Collection', // Valid value: Global, Collection or User.
object: 'Collection', // Valid value: Global, Collection or User.
objectName: 'CollectionName', // The name of the collection to grant access to. Use "*" to grant access to all collections.
privilegeName: 'CreateIndex'
})
```

Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,39 @@ milvusClient.revokePrivilege({

The name of the role to revoke privileges from.

- **object** (*RbacObjects*) -
- **object** (*string*) -

**[REQUIRED]**

The type of the object from which the privilege is being revoked.
The type of object for which the privilege is to be assigned.

Possible values:
Possible values are as follows:

- __Global__: System-wide objects, allowing the user to perform actions that affect all collections, users, or system-wide settings. When __object__ is set to __Global__, set __objectName__ 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**

- **objectName** (*str*) -
System-wide objects that allow the user to perform actions that affect all collections, users, or system-wide settings. When **object** is set to **Global**, set **objectName** to the wildcard (*****), indicating all objects of the specified type.

- **Collection**

Collection-specific objects that allow 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 that allow the user to manage credentials and roles for database users, such as updating user credentials or viewing user details.

- **objectName** (*string*) -

**[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__ is set to __Global__, set __objectName__ 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** is set to **Global**, set **objectName** 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).

- **privilegeName** (*PrivilegesTypes*) -

**[REQUIRED]**

The name of the privilege to revoke. You can use any value in the **Enumeration Members** column of the following table.
The name of the privilege to assign. You can use any value in the **Enumeration Members** column of the following table.

<table>
<tr>
Expand Down
60 changes: 23 additions & 37 deletions API_Reference/milvus-sdk-node/v2.4.x/Collections/DataType.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,44 @@ This is an enumeration that provides the following constants.

## Constants

- None = 0
- NONE = 0
Sets the data type to **NoneType**.

Sets the data type to **NoneType**.
- BOOL = 1
Sets the data type to **Boolean**.

- Bool = 1
- INT8 = 2
Sets the data type to **Int8**.

Sets the data type to **Boolean**.
- INT16 = 3
Sets the data type to **Int64**.

- Int8 = 2
- INT32 = 4
Sets the data type to **Int32**.

Sets the data type to **Int8**.
- INT64 = 5
Sets the data type to **Int64**.

- Int16 = 3
- FLOAT = 10
Sets the data type to **Float**.

Sets the data type to **Int16**.
- DOUBLE = 11
Sets the data type to **Double**.

- Int32 = 4
- VARCHAR = 21
Sets the data type to **Varchar**.

Sets the data type to **Int32**.

- Int64 = 5

Sets the data type to **Int64**.

- Float = 10

Sets the data type to **Float**.

- Double = 11

Sets the data type to **Double**.

- VarChar = 21

Sets the data type to **Varchar**.

- Array = 22

Sets the data type to **Array**.
- ARRAY = 22
Sets the data type to **Array**.

- JSON = 23

Sets the data type to **JSON**.
Sets the data type to **JSON**.

- BinaryVector = 100

Sets the data type to **Binary Vector**.
Sets the data type to **Binary Vector**.

- FloatVector = 101

Sets the data type to **Float Vector**.
Sets the data type to **Float Vector**.

- Float16Vector = 102

Expand All @@ -70,4 +57,3 @@ This is an enumeration that provides the following constants.

## Example

Sets the data type to **Sparse Vector**.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ milvusClient.createCollection({

- **auto_id** (*boolean*) -

Whether the primary field automatically increments along with data insertions.
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. 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**.

- **consistency_level** (*number* | *string*)

Expand Down Expand Up @@ -249,14 +253,14 @@ milvusClient.createCollection({

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 Expand Up @@ -422,14 +426,14 @@ milvusClient.createCollection({

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
Loading

0 comments on commit 307db6c

Please sign in to comment.