@zilliz/milvus2-sdk-node 2.3.5 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -35
- package/dist/milvus/HttpClient.d.ts +165 -2
- package/dist/milvus/HttpClient.js +17 -3
- package/dist/milvus/HttpClient.js.map +1 -1
- package/dist/milvus/MilvusClient.d.ts +3 -3
- package/dist/milvus/MilvusClient.js +42 -8
- package/dist/milvus/MilvusClient.js.map +1 -1
- package/dist/milvus/const/client.d.ts +4 -3
- package/dist/milvus/const/client.js +4 -3
- package/dist/milvus/const/client.js.map +1 -1
- package/dist/milvus/const/defaults.d.ts +5 -4
- package/dist/milvus/const/defaults.js +14 -13
- package/dist/milvus/const/defaults.js.map +1 -1
- package/dist/milvus/const/error.js +1 -1
- package/dist/milvus/const/error.js.map +1 -1
- package/dist/milvus/const/milvus.d.ts +47 -8
- package/dist/milvus/const/milvus.js +42 -3
- package/dist/milvus/const/milvus.js.map +1 -1
- package/dist/milvus/grpc/BaseClient.d.ts +11 -9
- package/dist/milvus/grpc/BaseClient.js +59 -21
- package/dist/milvus/grpc/BaseClient.js.map +1 -1
- package/dist/milvus/grpc/Collection.d.ts +311 -366
- package/dist/milvus/grpc/Collection.js +355 -387
- package/dist/milvus/grpc/Collection.js.map +1 -1
- package/dist/milvus/grpc/Data.d.ts +244 -291
- package/dist/milvus/grpc/Data.js +402 -539
- package/dist/milvus/grpc/Data.js.map +1 -1
- package/dist/milvus/grpc/Database.d.ts +29 -41
- package/dist/milvus/grpc/Database.js +32 -44
- package/dist/milvus/grpc/Database.js.map +1 -1
- package/dist/milvus/grpc/GrpcClient.d.ts +34 -13
- package/dist/milvus/grpc/GrpcClient.js +80 -70
- package/dist/milvus/grpc/GrpcClient.js.map +1 -1
- package/dist/milvus/grpc/MilvusIndex.d.ts +127 -67
- package/dist/milvus/grpc/MilvusIndex.js +166 -70
- package/dist/milvus/grpc/MilvusIndex.js.map +1 -1
- package/dist/milvus/grpc/Partition.d.ts +78 -113
- package/dist/milvus/grpc/Partition.js +109 -119
- package/dist/milvus/grpc/Partition.js.map +1 -1
- package/dist/milvus/grpc/Resource.d.ts +63 -92
- package/dist/milvus/grpc/Resource.js +69 -98
- package/dist/milvus/grpc/Resource.js.map +1 -1
- package/dist/milvus/grpc/User.d.ts +263 -295
- package/dist/milvus/grpc/User.js +287 -310
- package/dist/milvus/grpc/User.js.map +1 -1
- package/dist/milvus/http/Alias.d.ts +37 -0
- package/dist/milvus/http/Alias.js +62 -0
- package/dist/milvus/http/Alias.js.map +1 -0
- package/dist/milvus/http/Collection.d.ts +15 -1
- package/dist/milvus/http/Collection.js +55 -9
- package/dist/milvus/http/Collection.js.map +1 -1
- package/dist/milvus/http/Import.d.ts +33 -0
- package/dist/milvus/http/Import.js +48 -0
- package/dist/milvus/http/Import.js.map +1 -0
- package/dist/milvus/http/MilvusIndex.d.ts +35 -0
- package/dist/milvus/http/MilvusIndex.js +55 -0
- package/dist/milvus/http/MilvusIndex.js.map +1 -0
- package/dist/milvus/http/Partition.d.ts +41 -0
- package/dist/milvus/http/Partition.js +76 -0
- package/dist/milvus/http/Partition.js.map +1 -0
- package/dist/milvus/http/Role.d.ts +39 -0
- package/dist/milvus/http/Role.js +69 -0
- package/dist/milvus/http/Role.js.map +1 -0
- package/dist/milvus/http/User.d.ts +41 -0
- package/dist/milvus/http/User.js +76 -0
- package/dist/milvus/http/User.js.map +1 -0
- package/dist/milvus/http/Vector.d.ts +5 -3
- package/dist/milvus/http/Vector.js +10 -7
- package/dist/milvus/http/Vector.js.map +1 -1
- package/dist/milvus/http/index.d.ts +6 -0
- package/dist/milvus/http/index.js +6 -0
- package/dist/milvus/http/index.js.map +1 -1
- package/dist/milvus/index.d.ts +0 -1
- package/dist/milvus/index.js +0 -1
- package/dist/milvus/index.js.map +1 -1
- package/dist/milvus/types/Client.d.ts +5 -0
- package/dist/milvus/types/Collection.d.ts +34 -9
- package/dist/milvus/types/Common.d.ts +1 -3
- package/dist/milvus/types/Data.d.ts +79 -23
- package/dist/milvus/types/Data.js +1 -0
- package/dist/milvus/types/Data.js.map +1 -1
- package/dist/milvus/types/HighLevel.d.ts +6 -3
- package/dist/milvus/types/Http.d.ts +191 -9
- package/dist/milvus/types/MilvusIndex.d.ts +17 -3
- package/dist/milvus/utils/Bytes.d.ts +84 -0
- package/dist/milvus/utils/Bytes.js +261 -0
- package/dist/milvus/utils/Bytes.js.map +1 -0
- package/dist/milvus/utils/Format.d.ts +126 -68
- package/dist/milvus/utils/Format.js +375 -94
- package/dist/milvus/utils/Format.js.map +1 -1
- package/dist/milvus/utils/Function.d.ts +4 -2
- package/dist/milvus/utils/Function.js +58 -25
- package/dist/milvus/utils/Function.js.map +1 -1
- package/dist/milvus/utils/Grpc.d.ts +3 -2
- package/dist/milvus/utils/Grpc.js +65 -98
- package/dist/milvus/utils/Grpc.js.map +1 -1
- package/dist/milvus/utils/Validate.d.ts +18 -3
- package/dist/milvus/utils/Validate.js +38 -12
- package/dist/milvus/utils/Validate.js.map +1 -1
- package/dist/milvus/utils/index.d.ts +1 -1
- package/dist/milvus/utils/index.js +1 -1
- package/dist/milvus/utils/index.js.map +1 -1
- package/dist/proto/proto/common.proto +26 -1
- package/dist/proto/proto/google/protobuf/descriptor.proto +90 -28
- package/dist/proto/proto/milvus.proto +168 -2
- package/dist/proto/proto/rg.proto +28 -0
- package/dist/proto/proto/schema.proto +34 -0
- package/dist/sdk.json +1 -1
- package/package.json +8 -5
- package/dist/milvus/OrmClient.d.ts +0 -19
- package/dist/milvus/OrmClient.js +0 -51
- package/dist/milvus/OrmClient.js.map +0 -1
- package/dist/milvus/orm/Collection.d.ts +0 -43
- package/dist/milvus/orm/Collection.js +0 -165
- package/dist/milvus/orm/Collection.js.map +0 -1
- package/dist/milvus/orm/index.d.ts +0 -1
- package/dist/milvus/orm/index.js +0 -18
- package/dist/milvus/orm/index.js.map +0 -1
- package/dist/milvus/utils/Blob.d.ts +0 -4
- package/dist/milvus/utils/Blob.js +0 -18
- package/dist/milvus/utils/Blob.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Milvus2-sdk-node
|
|
2
2
|
|
|
3
3
|
[](https://badges.aleen42.com/src/typescript.svg)
|
|
4
|
-
[](https://
|
|
5
|
-
[](https://
|
|
4
|
+
[](https://github.com/zilliztech/attu/releases)
|
|
5
|
+
[](https://www.npmjs.com/package/@zilliz/milvus2-sdk-node)
|
|
6
6
|
[](https://codecov.io/gh/milvus-io/milvus-sdk-node)
|
|
7
7
|
|
|
8
8
|
The official [Milvus](https://github.com/milvus-io/milvus) client for Node.js.
|
|
@@ -11,9 +11,11 @@ The official [Milvus](https://github.com/milvus-io/milvus) client for Node.js.
|
|
|
11
11
|
|
|
12
12
|
The following table shows the recommended `@zilliz/milvus2-sdk-node` versions for different Milvus versions:
|
|
13
13
|
|
|
14
|
-
| Milvus version | Node sdk version | Installation
|
|
15
|
-
| :------------: | :--------------: |
|
|
16
|
-
| v2.
|
|
14
|
+
| Milvus version | Node sdk version | Installation |
|
|
15
|
+
| :------------: | :--------------: | :----------------------------------------- |
|
|
16
|
+
| v2.4.0+ | **latest** | `yarn add @zilliz/milvus2-sdk-node@latest` |
|
|
17
|
+
| v2.3.0+ | v2.3.5 | `yarn add @zilliz/milvus2-sdk-node@2.3.5` |
|
|
18
|
+
| v2.2.0+ | v2.3.5 | `yarn add @zilliz/milvus2-sdk-node@2.3.5` |
|
|
17
19
|
|
|
18
20
|
## Dependencies
|
|
19
21
|
|
|
@@ -31,21 +33,137 @@ npm install @zilliz/milvus2-sdk-node
|
|
|
31
33
|
yarn add @zilliz/milvus2-sdk-node
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
## What's new in v2.4.0
|
|
37
|
+
|
|
38
|
+
### New vector data types: float16 and bfloat16
|
|
39
|
+
|
|
40
|
+
Machine learning and neural networks often use half-precision data types, such as Float16 and BFloat16, [Milvus 2.4](https://milvus.io/docs/release_notes.md#Float16-and-BFloat16-Vector-DataType) supports inserting vectors in the BF16 and FP16 formats as bytes.
|
|
41
|
+
|
|
42
|
+
> However, these data types are not natively available in the Node.js environment, To enable users to utilize these formats, the Node SDK provides support for transformers during insert, query, and search operations.
|
|
43
|
+
>
|
|
44
|
+
> There are four default transformers for performing a float32 to bytes transformation for BF16 and Float16 types: f32ArrayToF16Bytes, f16BytesToF32Array, f32ArrayToBf16Bytes, and bf16BytesToF32Array. If you wish to use your own transformers for Float16 and BFloat16, you can specify them.
|
|
45
|
+
>
|
|
46
|
+
> ```javascript
|
|
47
|
+
> import {
|
|
48
|
+
> f32ArrayToF16Bytes,
|
|
49
|
+
> f16BytesToF32Array,
|
|
50
|
+
> f32ArrayToBf16Bytes,
|
|
51
|
+
> bf16BytesToF32Array,
|
|
52
|
+
> } from '@zilliz/milvus2-sdk-node';
|
|
53
|
+
>
|
|
54
|
+
> //Insert float32 array for the float16 field. Node SDK will transform it to bytes using `f32ArrayToF16Bytes`. You can use your own transformer.
|
|
55
|
+
> const insert = await milvusClient.insert({
|
|
56
|
+
> collection_name: COLLECTION_NAME,
|
|
57
|
+
> data: data,
|
|
58
|
+
> // transformers: {
|
|
59
|
+
> // [DataType.BFloat16Vector]: f32ArrayToF16Bytes, // use your own transformer
|
|
60
|
+
> // },
|
|
61
|
+
> });
|
|
62
|
+
> // query: output float32 array other than bytes,
|
|
63
|
+
> const query = await milvusClient.query({
|
|
64
|
+
> collection_name: COLLECTION_NAME,
|
|
65
|
+
> filter: 'id > 0',
|
|
66
|
+
> output_fields: ['vector', 'id'],
|
|
67
|
+
> // transformers: {
|
|
68
|
+
> // [DataType.BFloat16Vector]: bf16BytesToF32Array, // use your own transformer
|
|
69
|
+
> // },
|
|
70
|
+
> });
|
|
71
|
+
> // search: use bytes to search, output float32 array
|
|
72
|
+
> const search = await milvusClient.search({
|
|
73
|
+
> vector: data[0].vector, // if you pass bytes, no transform will performed
|
|
74
|
+
> collection_name: COLLECTION_NAME,
|
|
75
|
+
> output_fields: ['id', 'vector'],
|
|
76
|
+
> limit: 5,
|
|
77
|
+
> // transformers: {
|
|
78
|
+
> // [DataType.BFloat16Vector]: bf16BytesToF32Array, // use your own transformer
|
|
79
|
+
> // },
|
|
80
|
+
> });
|
|
81
|
+
> ```
|
|
82
|
+
|
|
83
|
+
### New vector data types: sparse vector(beta)
|
|
84
|
+
|
|
85
|
+
Sparse vectors in the Node SDK support four formats: `dict`, `coo`, `csr`, and `array`, However, query and search operations currently only output in the dict format.
|
|
35
86
|
|
|
36
|
-
|
|
87
|
+
```javascript
|
|
88
|
+
// dict
|
|
89
|
+
const sparseObject = {
|
|
90
|
+
3: 1.5,
|
|
91
|
+
6: 2.0,
|
|
92
|
+
9: -3.5,
|
|
93
|
+
};
|
|
94
|
+
// coo
|
|
95
|
+
const sparseCOO = [
|
|
96
|
+
{ index: 2, value: 5 },
|
|
97
|
+
{ index: 5, value: 3 },
|
|
98
|
+
{ index: 8, value: 7 },
|
|
99
|
+
];
|
|
100
|
+
// csr
|
|
101
|
+
const sparseCSR = {
|
|
102
|
+
indices: [2, 5, 8],
|
|
103
|
+
values: [5, 3, 7],
|
|
104
|
+
};
|
|
105
|
+
// array
|
|
106
|
+
const sparseArray = [undefined, 0.0, 0.5, 0.3, undefined, 0.2];
|
|
107
|
+
```
|
|
37
108
|
|
|
38
|
-
###
|
|
109
|
+
### Multi-vector and Hybrid Search
|
|
39
110
|
|
|
40
|
-
|
|
111
|
+
Starting from Milvus 2.4, it supports [Multi-Vector Search](https://milvus.io/docs/multi-vector-search.md#API-overview), you can continue to utilize the search API with similar parameters to perform multi-vector searches, and the format of the results remains unchanged.
|
|
41
112
|
|
|
42
|
-
|
|
113
|
+
```javascript
|
|
114
|
+
// single-vector search on a collection with multiple vector fields
|
|
115
|
+
const search = await milvusClient.search({
|
|
116
|
+
collection_name: collection_name,
|
|
117
|
+
data: [1, 2, 3, 4, 5, 6, 7, 8],
|
|
118
|
+
anns_field: 'vector', // required if you have multiple vector fields in the collection
|
|
119
|
+
params: { nprobe: 2 },
|
|
120
|
+
filter: 'id > 100',
|
|
121
|
+
limit: 5,
|
|
122
|
+
});
|
|
43
123
|
|
|
44
|
-
|
|
124
|
+
// multi-vector search on a collection with multiple vector fields
|
|
125
|
+
const search = await milvusClient.search({
|
|
126
|
+
collection_name: collection_name,
|
|
127
|
+
data: [
|
|
128
|
+
{
|
|
129
|
+
data: [1, 2, 3, 4, 5, 6, 7, 8],
|
|
130
|
+
anns_field: 'vector',
|
|
131
|
+
params: { nprobe: 2 },
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
|
135
|
+
anns_field: 'vector1',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
limit: 5,
|
|
139
|
+
filter: 'id > 100',
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### New Typescript client
|
|
144
|
+
|
|
145
|
+
Starting from v2.4.0, we introduced a TypeScript client to provide better support for the [Milvus RESTful API V2](https://milvus.io/api-reference/restful/v2.3.x/About.md), take a look at our [test file](https://github.com/milvus-io/milvus-sdk-node/blob/main/test/http/test.ts).
|
|
45
146
|
|
|
46
|
-
|
|
147
|
+
```javascript
|
|
148
|
+
import { HttpClient } from '@zilliz/milvus2-sdk-node';
|
|
149
|
+
const client = new HttpClient(config);
|
|
150
|
+
await client.createCollection(params);
|
|
151
|
+
await client.describeCollection(params);
|
|
152
|
+
await client.listCollections(params);
|
|
153
|
+
await client.insert(params);
|
|
154
|
+
await client.upsert(params);
|
|
155
|
+
await client.query(params);
|
|
156
|
+
await client.search(params);
|
|
157
|
+
```
|
|
47
158
|
|
|
48
|
-
|
|
159
|
+
## Code Examples
|
|
160
|
+
|
|
161
|
+
This table organizes the examples by technology, providing a brief description and the directory where each example can be found.
|
|
162
|
+
| Technology | Example | Directory |
|
|
163
|
+
|------------------|--------------------------------------------|-----------------------------------|
|
|
164
|
+
| Next.js | Next.js app example | [examples/nextjs](./examples/nextjs) |
|
|
165
|
+
| Node.js | Basic Node.js examples for Milvus | [examples/milvus](./examples/milvus) |
|
|
166
|
+
| Langchain.js | Basic Langchain.js example | [examples/langchain](./examples/LangChain) |
|
|
49
167
|
|
|
50
168
|
## Basic usages
|
|
51
169
|
|
|
@@ -54,16 +172,14 @@ This guide will show you how to set up a simple application using Node.js and Mi
|
|
|
54
172
|
### Start a Milvus server
|
|
55
173
|
|
|
56
174
|
```shell
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
# start the milvus server
|
|
61
|
-
sudo docker-compose up -d
|
|
175
|
+
# Start Milvus with script
|
|
176
|
+
wget https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh
|
|
177
|
+
bash standalone_embed.sh start
|
|
62
178
|
```
|
|
63
179
|
|
|
64
180
|
### Connect to Milvus
|
|
65
181
|
|
|
66
|
-
Create a new app.js file and add the following code to try out some basic vector operations using the Milvus node.js client. More details on the [API reference](https://milvus.io/api-reference/node/v2.
|
|
182
|
+
Create a new app.js file and add the following code to try out some basic vector operations using the Milvus node.js client. More details on the [API reference](https://milvus.io/api-reference/node/v2.3.x/Client/MilvusClient.md).
|
|
67
183
|
|
|
68
184
|
```javascript
|
|
69
185
|
import { MilvusClient, DataType } from '@zilliz/milvus2-sdk-node';
|
|
@@ -82,7 +198,7 @@ In Milvus, the concept of the collection is like the table in traditional RDBMS,
|
|
|
82
198
|
|
|
83
199
|
#### Define schema for collection
|
|
84
200
|
|
|
85
|
-
A schema defines the fields of a collection, such as the names and data types of the fields that make up the vectors. More details of how to define schema and advanced usage can be found in [API reference](https://milvus.io/api-reference/node/v2.
|
|
201
|
+
A schema defines the fields of a collection, such as the names and data types of the fields that make up the vectors. More details of how to define schema and advanced usage can be found in [API reference](https://milvus.io/api-reference/node/v2.3.x/Collection/createCollection.md).
|
|
86
202
|
|
|
87
203
|
```javascript
|
|
88
204
|
// define schema
|
|
@@ -128,31 +244,31 @@ The data format utilized by the Milvus Node SDK comprises an array of objects. I
|
|
|
128
244
|
```javascript
|
|
129
245
|
const fields_data = [
|
|
130
246
|
{
|
|
247
|
+
name: 'zlnmh',
|
|
131
248
|
vector: [
|
|
132
249
|
0.11878310581111173, 0.9694947902934701, 0.16443679307243175,
|
|
133
250
|
0.5484226189097237, 0.9839246709011924, 0.5178387104937776,
|
|
134
251
|
0.8716926129208069, 0.5616972243831446,
|
|
135
252
|
],
|
|
136
253
|
height: 20405,
|
|
137
|
-
name: 'zlnmh',
|
|
138
254
|
},
|
|
139
255
|
{
|
|
256
|
+
name: '5lr9y',
|
|
140
257
|
vector: [
|
|
141
258
|
0.9992090731236536, 0.8248790611809487, 0.8660083940881405,
|
|
142
259
|
0.09946359318481224, 0.6790698063908669, 0.5013786801063624,
|
|
143
260
|
0.795311915725105, 0.9183033261617566,
|
|
144
261
|
],
|
|
145
262
|
height: 93773,
|
|
146
|
-
name: '5lr9y',
|
|
147
263
|
},
|
|
148
264
|
{
|
|
265
|
+
name: 'nes0j',
|
|
149
266
|
vector: [
|
|
150
267
|
0.8761291569818763, 0.07127366044153227, 0.775648976160332,
|
|
151
268
|
0.5619757601304878, 0.6076543120476996, 0.8373907516027586,
|
|
152
269
|
0.8556140171597648, 0.4043893119391049,
|
|
153
270
|
],
|
|
154
271
|
height: 85122,
|
|
155
|
-
name: 'nes0j',
|
|
156
272
|
},
|
|
157
273
|
];
|
|
158
274
|
```
|
|
@@ -164,19 +280,18 @@ Once we have the data, you can insert data into the collection by calling the `i
|
|
|
164
280
|
```javascript
|
|
165
281
|
await client.insert({
|
|
166
282
|
collection_name,
|
|
167
|
-
|
|
283
|
+
data,
|
|
168
284
|
});
|
|
169
285
|
```
|
|
170
286
|
|
|
171
|
-
###
|
|
287
|
+
### Create index
|
|
172
288
|
|
|
173
289
|
By creating an index and loading the collection into memory, you can improve the performance of search and retrieval operations in Milvus, making it faster and more efficient to work with large-scale datasets.
|
|
174
290
|
|
|
175
291
|
```javascript
|
|
176
292
|
// create index
|
|
177
293
|
await client.createIndex({
|
|
178
|
-
// required
|
|
179
|
-
collection_name,
|
|
294
|
+
collection_name, // required
|
|
180
295
|
field_name: 'vector', // optional if you are using milvus v2.2.9+
|
|
181
296
|
index_name: 'myindex', // optional
|
|
182
297
|
index_type: 'HNSW', // optional if you are using milvus v2.2.9+
|
|
@@ -185,7 +300,7 @@ await client.createIndex({
|
|
|
185
300
|
});
|
|
186
301
|
```
|
|
187
302
|
|
|
188
|
-
Milvus supports [several different types of indexes](https://milvus.io/docs/index.md), each of which is optimized for different use cases and data distributions. Some of the most commonly used index types in Milvus include IVF_FLAT, IVF_SQ8, IVF_PQ
|
|
303
|
+
Milvus supports [several different types of indexes](https://milvus.io/docs/index.md), each of which is optimized for different use cases and data distributions. Some of the most commonly used index types in Milvus include HNSW, IVF_FLAT, IVF_SQ8, IVF_PQ. When creating an index in Milvus, you must choose an appropriate index type based on your specific use case and data distribution.
|
|
189
304
|
|
|
190
305
|
### Load collection
|
|
191
306
|
|
|
@@ -210,22 +325,26 @@ const searchVector = fields_data[0].vector;
|
|
|
210
325
|
const res = await client.search({
|
|
211
326
|
// required
|
|
212
327
|
collection_name, // required, the collection name
|
|
213
|
-
|
|
328
|
+
data: searchVector, // required, vector used to compare other vectors in milvus
|
|
214
329
|
// optionals
|
|
215
|
-
filter: 'height > 0', // optional, filter
|
|
330
|
+
filter: 'height > 0', // optional, filter expression
|
|
216
331
|
params: { nprobe: 64 }, // optional, specify the search parameters
|
|
217
332
|
limit: 10, // optional, specify the number of nearest neighbors to return
|
|
218
|
-
|
|
219
|
-
output_fields: ['height', 'name'], // optional, specify the fields to return in the search results
|
|
333
|
+
output_fields: ['height', 'name'], // optional, specify the fields to return in the search results,
|
|
220
334
|
});
|
|
221
335
|
```
|
|
222
336
|
|
|
223
337
|
## Next Steps
|
|
224
338
|
|
|
339
|
+
- [Attu, Using GUI to manage Milvus](https://github.com/zilliztech/attu)
|
|
340
|
+
" width="800" alt="attu home view" />
|
|
341
|
+
](https://github.com/zilliztech/attu/raw/main/.github/images/screenshot.png)
|
|
342
|
+
|
|
343
|
+
## other useful links
|
|
344
|
+
|
|
225
345
|
- [What is Milvus](https://milvus.io/)
|
|
226
|
-
- [Milvus Node SDK API reference](https://milvus.io/api-reference/node/v2.
|
|
227
|
-
- [
|
|
228
|
-
- [Feder, anns index visuliazation tool](https://github.com/zilliztech/feder)
|
|
346
|
+
- [Milvus Node SDK API reference](https://milvus.io/api-reference/node/v2.3.x/About.md)
|
|
347
|
+
- [Feder, anns index visualization tool](https://github.com/zilliztech/feder)
|
|
229
348
|
|
|
230
349
|
## How to contribute
|
|
231
350
|
|
|
@@ -30,6 +30,7 @@ export declare class HttpBaseClient {
|
|
|
30
30
|
Authorization: string;
|
|
31
31
|
Accept: string;
|
|
32
32
|
ContentType: string;
|
|
33
|
+
'Accept-Type-Allow-Int64': string;
|
|
33
34
|
};
|
|
34
35
|
get fetch(): ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
35
36
|
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions): Promise<T>;
|
|
@@ -37,10 +38,157 @@ export declare class HttpBaseClient {
|
|
|
37
38
|
}
|
|
38
39
|
declare const HttpClient_base: {
|
|
39
40
|
new (...args: any[]): {
|
|
41
|
+
readonly userPrefix: string;
|
|
42
|
+
createUser(params: import("./types").HttpUserCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
43
|
+
updateUserPassword(params: import("./types").HttpUserUpdatePasswordReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
44
|
+
dropUser(param: import("./types").HttpUserBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
45
|
+
describeUser(param: import("./types").HttpUserBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
|
|
46
|
+
listUsers(options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
|
|
47
|
+
grantRoleToUser(params: import("./types").HttpUserRoleReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
48
|
+
revokeRoleFromUser(params: import("./types").HttpUserRoleReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
49
|
+
config: HttpClientConfig;
|
|
50
|
+
readonly baseURL: string;
|
|
51
|
+
readonly authorization: string;
|
|
52
|
+
readonly database: string;
|
|
53
|
+
readonly timeout: number;
|
|
54
|
+
readonly headers: {
|
|
55
|
+
Authorization: string;
|
|
56
|
+
Accept: string;
|
|
57
|
+
ContentType: string;
|
|
58
|
+
'Accept-Type-Allow-Int64': string;
|
|
59
|
+
};
|
|
60
|
+
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
61
|
+
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
62
|
+
GET<T_1>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
|
|
63
|
+
};
|
|
64
|
+
} & {
|
|
65
|
+
new (...args: any[]): {
|
|
66
|
+
readonly rolePrefix: string;
|
|
67
|
+
listRoles(options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
|
|
68
|
+
describeRole(params: import("./types").HttpRoleBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpRoleDescribeResponse>;
|
|
69
|
+
createRole(params: import("./types").HttpRoleBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
70
|
+
dropRole(params: import("./types").HttpRoleBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
71
|
+
grantPrivilegeToRole(params: import("./types").HttpRolePrivilegeReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
72
|
+
revokePrivilegeFromRole(params: import("./types").HttpRolePrivilegeReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
73
|
+
config: HttpClientConfig;
|
|
74
|
+
readonly baseURL: string;
|
|
75
|
+
readonly authorization: string;
|
|
76
|
+
readonly database: string;
|
|
77
|
+
readonly timeout: number;
|
|
78
|
+
readonly headers: {
|
|
79
|
+
Authorization: string;
|
|
80
|
+
Accept: string;
|
|
81
|
+
ContentType: string;
|
|
82
|
+
'Accept-Type-Allow-Int64': string;
|
|
83
|
+
};
|
|
84
|
+
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
85
|
+
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
86
|
+
GET<T_1>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
|
|
87
|
+
};
|
|
88
|
+
} & {
|
|
89
|
+
new (...args: any[]): {
|
|
90
|
+
readonly indexPrefix: string;
|
|
91
|
+
createIndex(params: import("./types").HttpIndexCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
92
|
+
dropIndex(params: import("./types").HttpIndexBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
93
|
+
describeIndex(params: import("./types").HttpIndexBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpIndexDescribeResponse>;
|
|
94
|
+
listIndexes(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
|
|
95
|
+
config: HttpClientConfig;
|
|
96
|
+
readonly baseURL: string;
|
|
97
|
+
readonly authorization: string;
|
|
98
|
+
readonly database: string;
|
|
99
|
+
readonly timeout: number;
|
|
100
|
+
readonly headers: {
|
|
101
|
+
Authorization: string;
|
|
102
|
+
Accept: string;
|
|
103
|
+
ContentType: string;
|
|
104
|
+
'Accept-Type-Allow-Int64': string;
|
|
105
|
+
};
|
|
106
|
+
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
107
|
+
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
108
|
+
GET<T_1>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
|
|
109
|
+
};
|
|
110
|
+
} & {
|
|
111
|
+
new (...args: any[]): {
|
|
112
|
+
readonly importPrefix: string;
|
|
113
|
+
listImportJobs(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpImportListResponse>;
|
|
114
|
+
createImportJobs(params: import("./types").HttpImportCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpImportCreateResponse>;
|
|
115
|
+
getImportJobProgress(params: import("./types").HttpImportProgressReq, options?: FetchOptions | undefined): Promise<import("./types").HttpImportCreateResponse>;
|
|
116
|
+
config: HttpClientConfig;
|
|
117
|
+
readonly baseURL: string;
|
|
118
|
+
readonly authorization: string;
|
|
119
|
+
readonly database: string;
|
|
120
|
+
readonly timeout: number;
|
|
121
|
+
readonly headers: {
|
|
122
|
+
Authorization: string;
|
|
123
|
+
Accept: string;
|
|
124
|
+
ContentType: string;
|
|
125
|
+
'Accept-Type-Allow-Int64': string;
|
|
126
|
+
};
|
|
127
|
+
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
128
|
+
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
129
|
+
GET<T_1>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
|
|
130
|
+
};
|
|
131
|
+
} & {
|
|
132
|
+
new (...args: any[]): {
|
|
133
|
+
readonly aliasPrefix: string;
|
|
134
|
+
listAliases(params: import("./types").HttpAliasBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
|
|
135
|
+
createAlias(params: import("./types").HttpAliasCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
136
|
+
describeAlias(params: import("./types").HttpAliasDescribeReq, options?: FetchOptions | undefined): Promise<import("./types").HttpAliasDescribeResponse>;
|
|
137
|
+
dropAlias(params: import("./types").HttpAliasDropReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
138
|
+
alterAlias(params: import("./types").HttpAliasCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
139
|
+
config: HttpClientConfig;
|
|
140
|
+
readonly baseURL: string;
|
|
141
|
+
readonly authorization: string;
|
|
142
|
+
readonly database: string;
|
|
143
|
+
readonly timeout: number;
|
|
144
|
+
readonly headers: {
|
|
145
|
+
Authorization: string;
|
|
146
|
+
Accept: string;
|
|
147
|
+
ContentType: string;
|
|
148
|
+
'Accept-Type-Allow-Int64': string;
|
|
149
|
+
};
|
|
150
|
+
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
151
|
+
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
152
|
+
GET<T_1>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
|
|
153
|
+
};
|
|
154
|
+
} & {
|
|
155
|
+
new (...args: any[]): {
|
|
156
|
+
readonly partitionPrefix: string;
|
|
157
|
+
listPartitions(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<string[]>>;
|
|
158
|
+
createPartition(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
159
|
+
dropPartition(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
160
|
+
loadPartitions(params: import("./types").HttpPartitionListReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
161
|
+
releasePartitions(params: import("./types").HttpPartitionListReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
162
|
+
hasPartition(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpPartitionHasResponse>;
|
|
163
|
+
getPartitionStatistics(params: import("./types").HttpPartitionBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpPartitionStatisticsResponse>;
|
|
164
|
+
config: HttpClientConfig;
|
|
165
|
+
readonly baseURL: string;
|
|
166
|
+
readonly authorization: string;
|
|
167
|
+
readonly database: string;
|
|
168
|
+
readonly timeout: number;
|
|
169
|
+
readonly headers: {
|
|
170
|
+
Authorization: string;
|
|
171
|
+
Accept: string;
|
|
172
|
+
ContentType: string;
|
|
173
|
+
'Accept-Type-Allow-Int64': string;
|
|
174
|
+
};
|
|
175
|
+
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
176
|
+
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
177
|
+
GET<T_1>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
|
|
178
|
+
};
|
|
179
|
+
} & {
|
|
180
|
+
new (...args: any[]): {
|
|
181
|
+
readonly collectionPrefix: string;
|
|
40
182
|
createCollection(data: import("./types").HttpCollectionCreateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
41
183
|
describeCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionDescribeResponse>;
|
|
42
184
|
dropCollection(data: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
43
185
|
listCollections(params?: import("./types").HttpCollectionListReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionListResponse>;
|
|
186
|
+
hasCollection(params: Required<import("./types").HttpBaseReq>, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionHasResponse>;
|
|
187
|
+
renameCollection(params: import("./types").HttpCollectionRenameReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
188
|
+
getCollectionStatistics(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionStatisticsResponse>;
|
|
189
|
+
loadCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
190
|
+
releaseCollection(params: import("./types").HttpBaseReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
191
|
+
getCollectionLoadState(params: import("./types").HttpCollectionLoadStateReq, options?: FetchOptions | undefined): Promise<import("./types").HttpCollectionLoadStateResponse>;
|
|
44
192
|
config: HttpClientConfig;
|
|
45
193
|
readonly baseURL: string;
|
|
46
194
|
readonly authorization: string;
|
|
@@ -50,6 +198,7 @@ declare const HttpClient_base: {
|
|
|
50
198
|
Authorization: string;
|
|
51
199
|
Accept: string;
|
|
52
200
|
ContentType: string;
|
|
201
|
+
'Accept-Type-Allow-Int64': string;
|
|
53
202
|
};
|
|
54
203
|
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
55
204
|
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
@@ -57,9 +206,10 @@ declare const HttpClient_base: {
|
|
|
57
206
|
};
|
|
58
207
|
} & {
|
|
59
208
|
new (...args: any[]): {
|
|
60
|
-
|
|
209
|
+
readonly vectorPrefix: string;
|
|
210
|
+
get(params: import("./types").HttpVectorGetReq, options?: FetchOptions | undefined): Promise<import("./types").HttpVectorQueryResponse>;
|
|
61
211
|
insert(data: import("./types").HttpVectorInsertReq, options?: FetchOptions | undefined): Promise<import("./types").HttpVectorInsertResponse>;
|
|
62
|
-
upsert(data: import("./types").HttpVectorInsertReq, options?: FetchOptions | undefined): Promise<import("./types").
|
|
212
|
+
upsert(data: import("./types").HttpVectorInsertReq, options?: FetchOptions | undefined): Promise<import("./types").HttpVectorUpsertResponse>;
|
|
63
213
|
query(data: import("./types").HttpVectorQueryReq, options?: FetchOptions | undefined): Promise<import("./types").HttpVectorQueryResponse>;
|
|
64
214
|
search(data: import("./types").HttpVectorSearchReq, options?: FetchOptions | undefined): Promise<import("./types").HttpVectorSearchResponse>;
|
|
65
215
|
delete(data: import("./types").HttpVectorDeleteReq, options?: FetchOptions | undefined): Promise<import("./types").HttpBaseResponse<{}>>;
|
|
@@ -72,12 +222,25 @@ declare const HttpClient_base: {
|
|
|
72
222
|
Authorization: string;
|
|
73
223
|
Accept: string;
|
|
74
224
|
ContentType: string;
|
|
225
|
+
'Accept-Type-Allow-Int64': string;
|
|
75
226
|
};
|
|
76
227
|
readonly fetch: ((input: any, init?: any) => Promise<any>) | typeof fetch;
|
|
77
228
|
POST<T>(url: string, data?: Record<string, any>, options?: FetchOptions | undefined): Promise<T>;
|
|
78
229
|
GET<T_1>(url: string, params?: Record<string, any>, options?: FetchOptions | undefined): Promise<T_1>;
|
|
79
230
|
};
|
|
80
231
|
} & typeof HttpBaseClient;
|
|
232
|
+
/**
|
|
233
|
+
* The HttpClient class extends the functionality
|
|
234
|
+
* of the HttpBaseClient class by mixing in the
|
|
235
|
+
* - Collection
|
|
236
|
+
* - Vector
|
|
237
|
+
* - Alias
|
|
238
|
+
* - Partition
|
|
239
|
+
* - MilvusIndex
|
|
240
|
+
* - Import
|
|
241
|
+
* - Role
|
|
242
|
+
* - User APIs.
|
|
243
|
+
*/
|
|
81
244
|
export declare class HttpClient extends HttpClient_base {
|
|
82
245
|
}
|
|
83
246
|
export {};
|
|
@@ -46,7 +46,7 @@ class HttpBaseClient {
|
|
|
46
46
|
// baseURL
|
|
47
47
|
get baseURL() {
|
|
48
48
|
return (this.config.baseURL ||
|
|
49
|
-
`${this.config.endpoint}/${
|
|
49
|
+
`${this.config.endpoint}/${const_1.DEFAULT_HTTP_ENDPOINT_VERSION}`);
|
|
50
50
|
}
|
|
51
51
|
// authorization
|
|
52
52
|
get authorization() {
|
|
@@ -72,6 +72,9 @@ class HttpBaseClient {
|
|
|
72
72
|
Authorization: this.authorization,
|
|
73
73
|
Accept: 'application/json',
|
|
74
74
|
ContentType: 'application/json',
|
|
75
|
+
'Accept-Type-Allow-Int64': typeof this.config.acceptInt64 !== 'undefined'
|
|
76
|
+
? this.config.acceptInt64.toString()
|
|
77
|
+
: 'false',
|
|
75
78
|
};
|
|
76
79
|
}
|
|
77
80
|
// fetch
|
|
@@ -141,8 +144,19 @@ class HttpBaseClient {
|
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
exports.HttpBaseClient = HttpBaseClient;
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
/**
|
|
148
|
+
* The HttpClient class extends the functionality
|
|
149
|
+
* of the HttpBaseClient class by mixing in the
|
|
150
|
+
* - Collection
|
|
151
|
+
* - Vector
|
|
152
|
+
* - Alias
|
|
153
|
+
* - Partition
|
|
154
|
+
* - MilvusIndex
|
|
155
|
+
* - Import
|
|
156
|
+
* - Role
|
|
157
|
+
* - User APIs.
|
|
158
|
+
*/
|
|
159
|
+
class HttpClient extends (0, http_1.User)((0, http_1.Role)((0, http_1.MilvusIndex)((0, http_1.Import)((0, http_1.Alias)((0, http_1.Partition)((0, http_1.Collection)((0, http_1.Vector)(HttpBaseClient)))))))) {
|
|
146
160
|
}
|
|
147
161
|
exports.HttpClient = HttpClient;
|
|
148
162
|
//# sourceMappingURL=HttpClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.js","sourceRoot":"","sources":["../../milvus/HttpClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"HttpClient.js","sourceRoot":"","sources":["../../milvus/HttpClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCASgB;AAChB,2CAIyB;AAEzB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,cAAc;IAIzB,YAAY,MAAwB;QAClC,mCAAmC;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,2GAA2G;QAC3G,qFAAqF;QACrF,mEAAmE;QACnE,IAAI,CAAC,IA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aAAM,EAAC,IAAA,YAAK,EAAC,IAAA,gBAAS,EAAC,IAAA,iBAAU,EAAC,IAAA,aAAM,EAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC1E,CACF;CAAG;AAJJ,gCAII"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChannelOptions } from '@grpc/grpc-js';
|
|
2
|
-
import { GRPCClient, ClientConfig, CreateColReq, ResStatus, CreateCollectionReq } from '.';
|
|
2
|
+
import { GRPCClient, ClientConfig, CreateColReq, ResStatus, CreateCollectionReq, CreateColWithSchemaAndIndexParamsReq } from '.';
|
|
3
3
|
/**
|
|
4
4
|
* Milvus Client class that extends GRPCClient and handles communication with Milvus server.
|
|
5
5
|
*/
|
|
@@ -25,8 +25,8 @@ export declare class MilvusClient extends GRPCClient {
|
|
|
25
25
|
/**
|
|
26
26
|
* Creates a new collection with the given parameters.
|
|
27
27
|
* @function create_collection
|
|
28
|
-
* @param {CreateColReq} data - The data required to create the collection.
|
|
28
|
+
* @param {CreateColReq | CreateColWithSchemaAndIndexParamsReq | CreateCollectionReq} data - The data required to create the collection.
|
|
29
29
|
* @returns {Promise<ResStatus>} - The result of the operation.
|
|
30
30
|
*/
|
|
31
|
-
createCollection(data: CreateColReq | CreateCollectionReq): Promise<ResStatus>;
|
|
31
|
+
createCollection(data: CreateColReq | CreateColWithSchemaAndIndexParamsReq | CreateCollectionReq): Promise<ResStatus>;
|
|
32
32
|
}
|