From 1b5bba197b4aed9375232f795616cd1b2d8f05c4 Mon Sep 17 00:00:00 2001 From: AnthonyTsu1984 <115786031+AnthonyTsu1984@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:56:10 +0800 Subject: [PATCH] Add CSharp SDK Ref 2.2.x Signed-off-by: AnthonyTsu1984 <115786031+AnthonyTsu1984@users.noreply.github.com> --- .../milvus-sdk-csharp/v2.2.x/About.md | 36 ++++++++++++++++ .../v2.2.x/Alias/AlterAliasAsync().md | 21 ++++++++++ .../v2.2.x/Alias/CreateAliasAsync().md | 21 ++++++++++ .../v2.2.x/Alias/DropAliasAsync().md | 20 +++++++++ .../v2.2.x/Collection/CompactAsync().md | 19 +++++++++ .../v2.2.x/Collection/DeleteAsync().md | 21 ++++++++++ .../v2.2.x/Collection/DescribeAsync().md | 19 +++++++++ .../v2.2.x/Collection/DropAsync().md | 19 +++++++++ .../v2.2.x/Collection/FlushAsync().md | 20 +++++++++ .../Collection/GetEntityCountAsync().md | 19 +++++++++ .../Collection/GetLoadingProgressAsync().md | 20 +++++++++ .../v2.2.x/Collection/InsertAsync().md | 32 ++++++++++++++ .../v2.2.x/Collection/LoadAsync().md | 20 +++++++++ .../v2.2.x/Collection/QueryAsync().md | 34 +++++++++++++++ .../v2.2.x/Collection/ReleaseAsync().md | 19 +++++++++ .../v2.2.x/Collection/RenameAsync().md | 20 +++++++++ .../v2.2.x/Collection/SearchAsync().md | 42 +++++++++++++++++++ .../WaitForCollectionLoadAsync().md | 24 +++++++++++ .../v2.2.x/Database/CreateDatabaseAsync().md | 20 +++++++++ .../v2.2.x/Database/DropDatabaseAsync().md | 20 +++++++++ .../v2.2.x/Database/ListDatabasesAsync().md | 19 +++++++++ .../v2.2.x/Index/CreateIndexAsync().md | 24 +++++++++++ .../v2.2.x/Index/DescribeIndexAsync().md | 21 ++++++++++ .../v2.2.x/Index/DropIndexAsync().md | 21 ++++++++++ .../Index/GetIndexBuildProgressAsync().md | 21 ++++++++++ .../v2.2.x/Index/GetIndexStateAsync().md | 21 ++++++++++ .../v2.2.x/Index/WaitForIndexBuildAsync().md | 25 +++++++++++ .../Partition/CreatePartitionAsync().md | 20 +++++++++ .../v2.2.x/Partition/DropPartitionAsync().md | 20 +++++++++ .../GetPartitionStatisticsAsync().md | 20 +++++++++ .../v2.2.x/Partition/HasPartitionAsync().md | 20 +++++++++ .../v2.2.x/Partition/LoadPartitionAsync().md | 21 ++++++++++ .../v2.2.x/Partition/LoadPartitionsAsync().md | 21 ++++++++++ .../Partition/ReleasePartitionAsync().md | 20 +++++++++ .../Partition/ReleasePartitionsAsync().md | 20 +++++++++ .../v2.2.x/Partition/ShowPartitionsAsync().md | 19 +++++++++ .../v2.2.x/Role/AddUserToRoleAsync().md | 21 ++++++++++ .../v2.2.x/Role/CreateRoleAsync().md | 20 +++++++++ .../v2.2.x/Role/DropRoleAsync().md | 20 +++++++++ .../v2.2.x/Role/GrantRolePrivilegeAsync().md | 23 ++++++++++ .../v2.2.x/Role/ListGrantsForRoleAsync().md | 20 +++++++++ .../v2.2.x/Role/RemoveUserFromRoleAsync().md | 21 ++++++++++ .../v2.2.x/Role/RevokeRolePrivilegeAsync().md | 23 ++++++++++ .../v2.2.x/Role/SelectAllRolesAsync().md | 20 +++++++++ .../v2.2.x/Role/SelectAllUsersAsync().md | 20 +++++++++ .../SelectGrantForRoleAndObjectAsync().md | 20 +++++++++ .../v2.2.x/Role/SelectRoleAsync().md | 21 ++++++++++ .../v2.2.x/Role/SelectUserAsync().md | 21 ++++++++++ scripts/fetch_csharp_sdk_ref.sh | 8 ++++ 49 files changed, 1057 insertions(+) create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/About.md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Alias/AlterAliasAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Alias/CreateAliasAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Alias/DropAliasAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/CompactAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DeleteAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DescribeAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DropAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/FlushAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetEntityCountAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetLoadingProgressAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/InsertAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/LoadAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/QueryAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/ReleaseAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/RenameAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/SearchAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Collection/WaitForCollectionLoadAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Database/CreateDatabaseAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Database/DropDatabaseAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Database/ListDatabasesAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Index/CreateIndexAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Index/DescribeIndexAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Index/DropIndexAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexBuildProgressAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexStateAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Index/WaitForIndexBuildAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/CreatePartitionAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/DropPartitionAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/GetPartitionStatisticsAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/HasPartitionAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionsAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionsAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ShowPartitionsAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/AddUserToRoleAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/CreateRoleAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/DropRoleAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/GrantRolePrivilegeAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/ListGrantsForRoleAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/RemoveUserFromRoleAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/RevokeRolePrivilegeAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllRolesAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllUsersAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectGrantForRoleAndObjectAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectRoleAsync().md create mode 100644 API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectUserAsync().md create mode 100755 scripts/fetch_csharp_sdk_ref.sh diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/About.md b/API_Reference/milvus-sdk-csharp/v2.2.x/About.md new file mode 100644 index 000000000..38e5b5cdf --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/About.md @@ -0,0 +1,36 @@ +# About Milvus C# SDK + +Milvus C# SDK is an open-source project and its source code is hosted on [GitHub](https://github.com/milvus-io/milvus-sdk-csharp). + +## Compatibility + +| Nuget version | Branch | Description | Milvus version +| --- | --- | --- | --- | +| v2.2.2 | main | Support grpc only | 2.2.x | +| v2.2.1 | main | Support restfulapi and grpc[**Obsolete**] | 2.2.x | +| v2.2.0 | 2.2 | Support grpc only[**Obsolete**] | 2.2.x | + +## Installation + +You can use [.NET CLI](https://learn.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-using-the-dotnet-cli) to install and use the SDK. + +```shell +dotnet add package Milvus.Client --version 2.2.2-preview.5 +``` + +## Jupyter Notebooks 📙 + +You can find Jupyter notebooks in the [docs/notebooks](./docs/notebooks) folder. + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/milvus-io/milvus-sdk-csharp) + +* [00.Settings.ipynb](./docs/notebooks/00.Settings.ipynb) +* [01.Connect to milvus.ipynb](./docs/notebooks/01.Connect%20to%20milvus.ipynb) +* [02.Create a Collection.ipynb](./docs/notebooks/02.Create%20a%20Collection.ipynb) +* [03.Create a Partition.ipynb](./docs/notebooks/03.Create%20a%20Partition.ipynb) +* [04.Insert Vectors.ipynb](./docs/notebooks/04.Insert%20Vectors.ipynb) +* [05.Build an Index on Vectors.ipynb](./docs/notebooks/05.Build%20an%20Index%20on%20Vectors.ipynb) +* [06.Search.ipynb](./docs/notebooks/06.Search.ipynb) +* [07.Query.ipynb](./docs/notebooks/07.Query.ipynb) + +> Requirements: C# notebooks require .NET 7 and the VS Code Polyglot extension. \ No newline at end of file diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/AlterAliasAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/AlterAliasAsync().md new file mode 100644 index 000000000..735a84367 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/AlterAliasAsync().md @@ -0,0 +1,21 @@ +# AlterAliasAsync() + +Alters an alias to point to a new collection. + +## Invocation + +```c# +await milvusClient.AlterAliasAsync(collectionName, alias, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `collectionName` | The name of the collection to which the alias should point. | `string` | True | +| `alias` | The alias to be altered. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/CreateAliasAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/CreateAliasAsync().md new file mode 100644 index 000000000..16d60863f --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/CreateAliasAsync().md @@ -0,0 +1,21 @@ +# CreateAliasAsync() + +Creates an alias for a collection. + +## Invocation + +```c# +await milvusClient.CreateAliasAsync(collectionName, alias, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `collectionName` | The name of the collection for which to create the alias. | `string` | True | +| `alias` | The alias to be created. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/DropAliasAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/DropAliasAsync().md new file mode 100644 index 000000000..bdb095862 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Alias/DropAliasAsync().md @@ -0,0 +1,20 @@ +# DropAliasAsync() + +Drops an alias. + +## Invocation + +```c# +await milvusClient.DropAliasAsync(alias, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `alias` | The alias to be dropped. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/CompactAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/CompactAsync().md new file mode 100644 index 000000000..c34489b67 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/CompactAsync().md @@ -0,0 +1,19 @@ +# CompactAsync() + +Compacts the collection. + +## Invocation + +```c# +await collection.CompactAsync(newName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +The compaction ID. \ No newline at end of file diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DeleteAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DeleteAsync().md new file mode 100644 index 000000000..112fc0266 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DeleteAsync().md @@ -0,0 +1,21 @@ +# DeleteAsync()() + +Deletes rows from a collection by given expression. + +## Invocation + +```c# +await collection.DeleteAsync(expression, partitionName = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `expression` | A boolean expression determining which rows are to be deleted. | `string` | True | +| `partitionName` | An optional name of a partition from which rows are to be deleted. | `string?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A `MutationResult` containing information about the drop operation. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DescribeAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DescribeAsync().md new file mode 100644 index 000000000..532fd3c7f --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DescribeAsync().md @@ -0,0 +1,19 @@ +# DescribeAsync() + +Describes a collection, returning information about its configuration and schema. + +## Invocation + +```c# +await collection.DescribeAsync(cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A description of the collection. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DropAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DropAsync().md new file mode 100644 index 000000000..1c64e7dd0 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/DropAsync().md @@ -0,0 +1,19 @@ +# DropAsync() + +Drops a collection. + +## Invocation + +```c# +await collection.DropAsync(cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/FlushAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/FlushAsync().md new file mode 100644 index 000000000..e42c3b2cc --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/FlushAsync().md @@ -0,0 +1,20 @@ +# FlushAsync() + +Flushes collection data to disk, required only in order to get up-to-date statistics. +This method will be removed in a future version. + +## Invocation + +```c# +await collection.FlushAsync(cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A `FlushResult` containing information about the flush operation. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetEntityCountAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetEntityCountAsync().md new file mode 100644 index 000000000..a47aae487 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetEntityCountAsync().md @@ -0,0 +1,19 @@ +# GetEntityCountAsync() + +Retrieves the current number of entities in the collection. Call `FlushAsync` before invoking this method to ensure up-to-date results. + +## Invocation + +```c# +await collection.GetEntityCountAsync(cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +The number of entities currently in the collection. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetLoadingProgressAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetLoadingProgressAsync().md new file mode 100644 index 000000000..6748b1f02 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/GetLoadingProgressAsync().md @@ -0,0 +1,20 @@ +# GetLoadingProgressAsync() + +Returns the loading progress for a collection, and optionally one or more of its partitions. + +## Invocation + +```c# +await collection.GetLoadingProgressAsync(partitionNames = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionNames` | An optional list of partition names for which to check the loading progress. | `IReadOnlyList?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is . | `CancellationToken` | False | + +## Return + +The loading progress of the collection. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/InsertAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/InsertAsync().md new file mode 100644 index 000000000..5e125a6fe --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/InsertAsync().md @@ -0,0 +1,32 @@ +# InsertAsync() + +Inserts rows of data into a collection. + +## Invocation + +```c# +await collection.InsertAsync(data, partitionName = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `data` | The field data to insert; each field contains a list of row values. | `IReadOnlyList` | True | +| `partitionName` | An optional name of a partition to insert into. | `string?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. + +## Example + +```c# +await milvusClient.GetCollection("book").InsertAsync(new FieldData[] +{ + FieldData.Create("book_id", bookIds), + FieldData.Create("word_count", wordCounts), + FieldData.CreateFloatVector("book_intro", bookIntros) +}); +``` diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/LoadAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/LoadAsync().md new file mode 100644 index 000000000..547fcd564 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/LoadAsync().md @@ -0,0 +1,20 @@ +# LoadAsync() + +Loads a collection into memory so that it can be searched or queried. + +## Invocation + +```c# +await collection.LoadAsync(replicaNumber = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `replicaNumber` | An optional replica number to load. | `int?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/QueryAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/QueryAsync().md new file mode 100644 index 000000000..2f2a7aeb7 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/QueryAsync().md @@ -0,0 +1,34 @@ +# QueryAsync() + +Retrieves rows from a collection via scalar filtering based on a boolean expression. + +## Invocation + +```c# +await collection.QueryAsync(expression, parameters = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `expression` | A boolean expression determining which rows are to be returned. | `string` | True | +| `parameters` | Various additional optional parameters to configure the query. | `QueryParameters?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A list of `FieldData` instances with the query results. + +## Example + +```c# +var results = await Client.GetCollection("book").QueryAsync( + expression: "book_id in [2,4,6,8]", + new QueryParameters + { + Offset = 0, + Limit = 10, + OutputFields = { "book_id", "book_intro" } + }); +``` diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/ReleaseAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/ReleaseAsync().md new file mode 100644 index 000000000..5c48e2528 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/ReleaseAsync().md @@ -0,0 +1,19 @@ +# ReleaseAsync() + +Releases a collection that has been previously loaded. + +## Invocation + +```c# +await collection.ReleaseAsync(cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/RenameAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/RenameAsync().md new file mode 100644 index 000000000..0162d74e2 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/RenameAsync().md @@ -0,0 +1,20 @@ +# RenameAsync() + +Renames a collection. + +## Invocation + +```c# +await collection.RenameAsync(newName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `newName` | The new collection name. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/SearchAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/SearchAsync().md new file mode 100644 index 000000000..2df2f143d --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/SearchAsync().md @@ -0,0 +1,42 @@ +# SearchAsync()() + +Perform a vector similarity search. + +## Invocation + +```c# +await collection.SearchAsync(vectorFieldName, vectors, metricType, limit, parameters = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -------- | +| `vectorFieldName` | The name of the vector field to search in. | `string` | True | +| `vectors` | The set of vectors to send as input for the similarity search. | `IReadOnlyList>` | True | +| `metricType` | Method used to measure the distance between vectors during search. Must correspond to the metric type specified when building the index. | `SimilarityMetricType` | True | +| `limit` | The maximum number of records to return, also known as 'topk'. Must be between 1 and 16384. | `int` | True | +| `parameters` | Various additional optional parameters to configure the similarity search. | `SearchParameters` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +The results of the vector similarity search. + +## Example + +```c# +var results = await milvusClient.GetCollection("book").SearchAsync( + vectorFieldName: "book_intro", + vectors: new ReadOnlyMemory[] { new[] { 0.1f, 0.2f } }, + SimilarityMetricType.L2, + // the sum of `offset` in `parameters` and `limit` should be less than 16384. + limit: 10, + new SearchParameters + { + OutputFields = { "title" }, + ConsistencyLevel = ConsistencyLevel.Strong, + Offset = 5, + ExtraParameters = { ["nprobe"] = "1024" } + }); +``` diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/WaitForCollectionLoadAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/WaitForCollectionLoadAsync().md new file mode 100644 index 000000000..e0f92e7d9 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Collection/WaitForCollectionLoadAsync().md @@ -0,0 +1,24 @@ +# WaitForCollectionLoadAsync() + +Polls Milvus for loading progress of a collection until it is fully loaded. +To perform a single progress check, use `GetLoadingProgressAsync`. + +## Invocation + +```c# +await collection.WaitForCollectionLoadAsync(partitionNames = null, waitingInterval = null, timeout = null, progress = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionNames` | An optional list of partition names for which to check the loading progress. | `IReadOnlyList?` | False | +| `waitingInterval` | Waiting interval. Defaults to 500 milliseconds. | `TimeSpan?` | False | +| `timeout` | How long to poll for before throwing a `TimeoutException`. | `TimeSpan?` | False | +| `progress` | Provides information about the progress of the loading operation. | `IProgress?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Database/CreateDatabaseAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Database/CreateDatabaseAsync().md new file mode 100644 index 000000000..50f382cd8 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Database/CreateDatabaseAsync().md @@ -0,0 +1,20 @@ +# CreateDatabaseAsync() + +Creates a new database. + +## Invocation + +```c# +await milvusClient.CreateDatabaseAsync(databaseName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `databaseName` | The name of the new database to be created. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Database/DropDatabaseAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Database/DropDatabaseAsync().md new file mode 100644 index 000000000..cc1fd33c1 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Database/DropDatabaseAsync().md @@ -0,0 +1,20 @@ +# DropDatabaseAsync() + +Drops a database. + +## Invocation + +```c# +await milvusClient.DropDatabaseAsync(databaseName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `databaseName` | The name of the database to be dropped. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Database/ListDatabasesAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Database/ListDatabasesAsync().md new file mode 100644 index 000000000..ffc558b02 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Database/ListDatabasesAsync().md @@ -0,0 +1,19 @@ +# ListDatabasesAsync() + +List all available databases. + +## Invocation + +```c# +await milvusClient.ListDatabasesAsync(cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +The list of available databases. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Index/CreateIndexAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/CreateIndexAsync().md new file mode 100644 index 000000000..68df7f9f0 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/CreateIndexAsync().md @@ -0,0 +1,24 @@ +# CreateIndexAsync() + +Creates an index. + +## Invocation + +```c# +await collection.CreateIndexAsync(fieldName, indexType = null, metricType = null, indexName = null, extraParams = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `fieldName` | The name of the field in the collection for which the index will be created. | `string` | True | +| `indexType` | The type of the index to be created. | `IndexType?` | False | +| `metricType` | Method used to measure the distance between vectors during search. | `SimilarityMetricType?` | False | +| `indexName` | An optional name for the index to be created. | `string?` | False | +| `extraParams` | Extra parameters specific to each index type; consult the documentation for your index type for more details. | `IDictionary?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Index/DescribeIndexAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/DescribeIndexAsync().md new file mode 100644 index 000000000..1d5f12257 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/DescribeIndexAsync().md @@ -0,0 +1,21 @@ +# DescribeIndexAsync() + +Describes an index, returning information about its configuration. + +## Invocation + +```c# +await collection.DescribeIndexAsync(fieldName, indexName = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `fieldName` | The name of the field which has the index to be described. | `string` | True | +| `indexName` | An optional name of the index to be described. | `string?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A list of `MilvusIndexInfo` containing information about the matching indexes. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Index/DropIndexAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/DropIndexAsync().md new file mode 100644 index 000000000..008d7c270 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/DropIndexAsync().md @@ -0,0 +1,21 @@ +# DropIndexAsync() + +Drops an index. + +## Invocation + +```c# +await collection.DropIndexAsync(fieldName, indexName = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `fieldName` | The name of the field which has the index to be dropped. | `string` | True | +| `indexName` | An optional name for the index to be dropped. | `string?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexBuildProgressAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexBuildProgressAsync().md new file mode 100644 index 000000000..2de88be16 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexBuildProgressAsync().md @@ -0,0 +1,21 @@ +# GetIndexBuildProgressAsync() + +Gets the build progress of an index. + +## Invocation + +```c# +await collection.GetIndexBuildProgressAsync(fieldName, indexName = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `fieldName` | The name of the field which has the index. | `string` | True | +| `indexName` | An optional name of the index. | `string?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +An `IndexBuildProgress` with the number of rows indexed and the total number of rows. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexStateAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexStateAsync().md new file mode 100644 index 000000000..46de8ef90 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/GetIndexStateAsync().md @@ -0,0 +1,21 @@ +# GetIndexStateAsync() + +Gets the state of an index. + +## Invocation + +```c# +await collection.GetIndexStateAsync(fieldName, indexName = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `fieldName` | The name of the field which has the index to get the state for. | `string` | True | +| `indexName` | An optional name of the index to get the state for. | `string?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +The state of the index. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Index/WaitForIndexBuildAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/WaitForIndexBuildAsync().md new file mode 100644 index 000000000..05f09a445 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Index/WaitForIndexBuildAsync().md @@ -0,0 +1,25 @@ +# WaitForIndexBuildAsync() + +Polls Milvus for building progress of an index until it is fully built. +To perform a single progress check, use `GetIndexBuildProgressAsync`. + +## Invocation + +```c# +await collection.WaitForIndexBuildAsync(fieldName, indexName = null, waitingInterval = null, timeout = null, progress = null, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `fieldName` | The name of the field which has the index. | `string` | True | +| `indexName` | An optional name of the index. | `string?` | False | +| `waitingInterval` | Waiting interval. Defaults to 500 milliseconds. | `TimeSpan?` | False | +| `timeout` | How long to poll for before throwing a `TimeoutException`. | `TimeSpan?` | False | +| `progress` | Provides information about the progress of the loading operation. | `IProgress?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/CreatePartitionAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/CreatePartitionAsync().md new file mode 100644 index 000000000..1588cb672 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/CreatePartitionAsync().md @@ -0,0 +1,20 @@ +# CreatePartitionAsync() + +Creates a partition. + +## Invocation + +```c# +await collection.CreatePartitionAsync(partitionName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionName` | The name of partition to be created. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/DropPartitionAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/DropPartitionAsync().md new file mode 100644 index 000000000..f1e79e45b --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/DropPartitionAsync().md @@ -0,0 +1,20 @@ +# DropPartitionAsync() + +Creates a partition. + +## Invocation + +```c# +await collection.DropPartitionAsync(partitionName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionName` | The name of partition to be dropped. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/GetPartitionStatisticsAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/GetPartitionStatisticsAsync().md new file mode 100644 index 000000000..97fafbcb5 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/GetPartitionStatisticsAsync().md @@ -0,0 +1,20 @@ +# GetPartitionStatisticsAsync() + +Retrieves statistics for a partition. + +## Invocation + +```c# +await collection.GetPartitionStatisticsAsync(partitionName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionName` | The name of partition for which statistics are to be retrieved. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A dictionary containing statistics about the partition. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/HasPartitionAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/HasPartitionAsync().md new file mode 100644 index 000000000..5be3957ed --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/HasPartitionAsync().md @@ -0,0 +1,20 @@ +# HasPartitionAsync() + +Checks whether a partition exists. + +## Invocation + +```c# +await collection.HasPartitionAsync(partitionName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionName` | The name of partition to be checked. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +Whether the partition exists or not. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionAsync().md new file mode 100644 index 000000000..6545ce36e --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionAsync().md @@ -0,0 +1,21 @@ +# LoadPartitionAsync() + +Loads a partition into memory so that it can be searched or queries. + +## Invocation + +```c# +await collection.LoadPartitionAsync(partitionName, replicaNumber = 1, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionName` | The name of partition to be loaded. | `string` | True | +| `replicaNumber` | An optional replica number to load. | `int?` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionsAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionsAsync().md new file mode 100644 index 000000000..8c45f4c96 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/LoadPartitionsAsync().md @@ -0,0 +1,21 @@ +# LoadPartitionsAsync() + +Loads partitions into memory so that they can be searched or queries. + +## Invocation + +```c# +await collection.CreatePartitionsAsync(partitionNames, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionNames` | The names of the partitions to be loaded. | `IReadOnlyList` | True | +| `replicaNumber` | An optional replica number to load. | `int?` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionAsync().md new file mode 100644 index 000000000..edcb1842a --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionAsync().md @@ -0,0 +1,20 @@ +# ReleasePartitionAsync() + +Releases a loaded partition from memory. + +## Invocation + +```c# +await collection.ReleasePartitionAsync(partitionName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionName` | The name of partition to be released. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionsAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionsAsync().md new file mode 100644 index 000000000..e14181319 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ReleasePartitionsAsync().md @@ -0,0 +1,20 @@ +# ReleasePartitionAsync() + +Releases loaded partitions from memory. + +## Invocation + +```c# +await collection.ReleasePartitionsAsync(partitionNames, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `partitionNames` | The names of the partitions to be released. | `IReadOnlyList` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ShowPartitionsAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ShowPartitionsAsync().md new file mode 100644 index 000000000..582a958b5 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Partition/ShowPartitionsAsync().md @@ -0,0 +1,19 @@ +# ShowPartitionsAsync() + +Lists all partitions defined for a collection. + +## Invocation + +```c# +await collection.ShowPartitionsAsync(cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A list of `MilvusPartition` instances providing information about all partitions in the collection. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/AddUserToRoleAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/AddUserToRoleAsync().md new file mode 100644 index 000000000..619b7f744 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/AddUserToRoleAsync().md @@ -0,0 +1,21 @@ +# AddUserToRoleAsync() + +Adds a user to a role. + +## Invocation + +```c# +await milvusClient.AddUserToRoleAsync(username, roleName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `username` | The name of the username to be added to the role. | `string` | True | +| `roleName` | The name of the role the user will be added to. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/CreateRoleAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/CreateRoleAsync().md new file mode 100644 index 000000000..374b11e26 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/CreateRoleAsync().md @@ -0,0 +1,20 @@ +# CreateRoleAsync() + +Creates a role. + +## Invocation + +```c# +await milvusClient.CreateRoleAsync(roleName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `roleName` | The name of the role to be created. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/DropRoleAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/DropRoleAsync().md new file mode 100644 index 000000000..8d6333fd4 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/DropRoleAsync().md @@ -0,0 +1,20 @@ +# DropRoleAsync() + +Drops a role. + +## Invocation + +```c# +await milvusClient.DropRoleAsync(roleName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `roleName` | The name of the role to be dropped. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/GrantRolePrivilegeAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/GrantRolePrivilegeAsync().md new file mode 100644 index 000000000..ad1cf5071 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/GrantRolePrivilegeAsync().md @@ -0,0 +1,23 @@ +# GrantRolePrivilegeAsync() + +Revokes a privilege from a role. + +## Invocation + +```c# +await milvusClient.GrantRolePrivilegeAsync(roleName, object, objectName, privilege, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `roleName` | The name of the role to be granted a privilege. | `string` | True | +| `object` | A string describing the object type on which the privilege is to be granted, e.g. `"Collection"`. | `string` | True | +| `objectName` | A string describing the specific object on which the privilege will be granted. Can be `"*"`. | `string` | True | +| `privilege` | A string describing the privilege to be granted, e.g. `"Search"`. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/ListGrantsForRoleAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/ListGrantsForRoleAsync().md new file mode 100644 index 000000000..3b556b8b3 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/ListGrantsForRoleAsync().md @@ -0,0 +1,20 @@ +# ListGrantsForRoleAsync() + +Lists a grant info for the role and the specific object. + +## Invocation + +```c# +await milvusClient.ListGrantsForRoleAsync(roleName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `roleName` | The name of the role. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A list of `GrantEntity` instances describing the grants assigned to the role. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/RemoveUserFromRoleAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/RemoveUserFromRoleAsync().md new file mode 100644 index 000000000..e2ccfb1f9 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/RemoveUserFromRoleAsync().md @@ -0,0 +1,21 @@ +# RemoveUserFromRoleAsync() + +Removes a user from a role. + +## Invocation + +```c# +await milvusClient.RemoveUserFromRoleAsync(username, roleName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `username` | The name of the user to be removed from the role. | `string` | True | +| `roleName` | The name of the role from which the user is to be removed. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/RevokeRolePrivilegeAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/RevokeRolePrivilegeAsync().md new file mode 100644 index 000000000..8dac43e25 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/RevokeRolePrivilegeAsync().md @@ -0,0 +1,23 @@ +# RevokeRolePrivilegeAsync() + +Revokes a privilege from a role. + +## Invocation + +```c# +await milvusClient.RevokeRolePrivilegeAsync(roleName, object, objectName, privilege, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `roleName` | The name of the role to be created. | `string` | True | +| `object` | A string describing the object type on which the privilege is to be revoked, e.g. `"Collection"`. | `string` | True | +| `objectName` | A string describing the specific object on which the privilege will be revoked. Can be `"*"`. | `string` | True | +| `privilege` | A string describing the privilege to be revoked, e.g. `"Search"`. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllRolesAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllRolesAsync().md new file mode 100644 index 000000000..a3b940b22 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllRolesAsync().md @@ -0,0 +1,20 @@ +# SelectAllRolesAsync() + +Gets information about all roles defined in Milvus, including optionally all their users. + +## Invocation + +```c# +await milvusClient.SelectAllRolesAsync(includeUserInfo = true, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `includeUserInfo` | Whether to include user information in the results. | `bool` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A list of `RoleResult` instances containing information about all the roles. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllUsersAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllUsersAsync().md new file mode 100644 index 000000000..d59ea330e --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectAllUsersAsync().md @@ -0,0 +1,20 @@ +# SelectAllUsersAsync() + +Gets information about all users defined in Milvus, including optionally all their users. + +## Invocation + +```c# +await milvusClient.SelectAllUsersAsync(includeRoleInfo = true, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `includeRoleInfo` | Whether to include role information in the results. | `bool` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A list of `UserResult` instances containing information about all the users. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectGrantForRoleAndObjectAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectGrantForRoleAndObjectAsync().md new file mode 100644 index 000000000..93e27e689 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectGrantForRoleAndObjectAsync().md @@ -0,0 +1,20 @@ +# SelectGrantForRoleAndObjectAsync() + +Creates a role. + +## Invocation + +```c# +await milvusClient.SelectGrantForRoleAndObjectAsync(roleName, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `roleName` | The name of the role to be created. | `string` | True | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +This method does not return any value. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectRoleAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectRoleAsync().md new file mode 100644 index 000000000..c7cc9dc4a --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectRoleAsync().md @@ -0,0 +1,21 @@ +# SelectRoleAsync() + +Gets information about a role, including optionally all its users. + +## Invocation + +```c# +await milvusClient.SelectRoleAsync(roleName, includeUserInfo = true, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `roleName` | The name of the role to be selected. | `string` | True | +| `includeUserInfo` | Whether to include user information in the results. | `bool` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A `RoleResult` instance containing information about the role, or `null` if the role does not exist. diff --git a/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectUserAsync().md b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectUserAsync().md new file mode 100644 index 000000000..d59480fd5 --- /dev/null +++ b/API_Reference/milvus-sdk-csharp/v2.2.x/Role/SelectUserAsync().md @@ -0,0 +1,21 @@ +# SelectUserAsync() + +Gets information about a user, including optionally all its roles. + +## Invocation + +```c# +await milvusClient.SelectUserAsync(username, includeRoleInfo = true, cancellationToken = default); +``` + +## Parameters + +| Parameter | Description | Type | Required | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | +| `username` | The name of the user to be selected. | `string` | True | +| `includeRoleInfo` | Whether to include role information in the results. | `bool` | False | +| `cancellationToken` | The token to monitor for cancellation requests. The default value is `CancellationToken.None`. | `CancellationToken` | False | + +## Return + +A `UserResult` instance containing information about the user, or `null` if the user does not exist. diff --git a/scripts/fetch_csharp_sdk_ref.sh b/scripts/fetch_csharp_sdk_ref.sh new file mode 100755 index 000000000..9a48a5a22 --- /dev/null +++ b/scripts/fetch_csharp_sdk_ref.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +VERSION=$1 + +git clone https://github.com/milvus-io/milvus-sdk-csharp.git +rm -rf API_Reference/milvus-sdk-csharp/$VERSION/*/ +cp -r milvus-sdk-csharp/docs/api_reference/* API_Reference/milvus-sdk-csharp/$VERSION/ +rm -rf milvus-sdk-csharp \ No newline at end of file