You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`runAnalyzer()` accepts either `analyzer_params` for an ad-hoc analyzer configuration or collection context fields (`db_name`, `collection_name`, `field_name`, `analyzer_names`) to use analyzers defined in a schema.
For lexical highlighting, set `highlight_search_text:true` to include the matched search text in highlight output when supported by Milvus. For semantic highlighting, set `highlight_only:true` to return only highlighted fragments instead of the full source text.
Copy file name to clipboardExpand all lines: docs/content/core-concepts/client-configuration.mdx
+29-12Lines changed: 29 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,23 +69,23 @@ const client = new MilvusClient({
69
69
rootCertPath:'/path/to/ca.pem',
70
70
// Or certificate buffer
71
71
rootCert:Buffer.from('...'),
72
-
72
+
73
73
// Private key path (for client authentication)
74
74
privateKeyPath:'/path/to/key.pem',
75
75
// Or private key buffer
76
76
privateKey:Buffer.from('...'),
77
-
77
+
78
78
// Certificate chain path
79
79
certChainPath:'/path/to/cert.pem',
80
80
// Or certificate buffer
81
81
certChain:Buffer.from('...'),
82
-
82
+
83
83
// Server name for SNI
84
84
serverName:'milvus.example.com',
85
-
85
+
86
86
// Skip certificate verification (not recommended for production)
87
87
skipCertCheck:false,
88
-
88
+
89
89
// Additional verify options
90
90
verifyOptions: {},
91
91
},
@@ -171,6 +171,22 @@ const client = new MilvusClient({
171
171
});
172
172
```
173
173
174
+
### Connect Reserved Options
175
+
176
+
Use `option` to pass reserved key-value metadata in the initial Milvus `Connect` request. These values are sent as `client_info.reserved` and are useful for deployment-specific routing, attribution, or internal integrations.
177
+
178
+
```javascript
179
+
constclient=newMilvusClient({
180
+
address:'localhost:19530',
181
+
option: {
182
+
app:'recommendation-service',
183
+
environment:'production',
184
+
},
185
+
});
186
+
```
187
+
188
+
`option` values must be strings.
189
+
174
190
## Environment-Specific Configuration
175
191
176
192
### Development
@@ -217,32 +233,32 @@ const client = new MilvusClient({
Copy file name to clipboardExpand all lines: docs/content/core-concepts/data-types-schemas.mdx
+67-4Lines changed: 67 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,15 +144,22 @@ Sparse vectors store only non-zero values with their indices. Commonly used for
144
144
Sparse vectors can be inserted in two formats:
145
145
146
146
**Dictionary format** (recommended):
147
+
147
148
```javascript
148
149
// Keys are indices, values are float weights
149
150
{ 10:0.5, 100:0.3, 500:0.8, 1200:0.1 }
150
151
```
151
152
152
153
**Array of tuples format:**
154
+
153
155
```javascript
154
156
// [index, value] pairs
155
-
[[10, 0.5], [100, 0.3], [500, 0.8], [1200, 0.1]]
157
+
[
158
+
[10, 0.5],
159
+
[100, 0.3],
160
+
[500, 0.8],
161
+
[1200, 0.1],
162
+
];
156
163
```
157
164
158
165
Note: Dimension is determined automatically from the maximum index across all vectors.
@@ -193,6 +200,29 @@ BFloat16 vector:
193
200
}
194
201
```
195
202
203
+
#### Nullable Vector Fields
204
+
205
+
Vector fields can be marked as nullable. Insert or upsert `null` for rows that do not have an embedding yet; query and search results return `null` for those fields.
206
+
207
+
```javascript
208
+
{
209
+
name:'optional_embedding',
210
+
data_type:DataType.FloatVector,
211
+
dim:128,
212
+
nullable:true,
213
+
}
214
+
215
+
awaitclient.insert({
216
+
collection_name:'my_collection',
217
+
data: [
218
+
{ id:1, optional_embedding: [/* 128 floats */] },
219
+
{ id:2, optional_embedding:null },
220
+
],
221
+
});
222
+
```
223
+
224
+
Nullable vector payloads are supported for `FloatVector`, `BinaryVector`, `Float16Vector`, `BFloat16Vector`, `SparseFloatVector`, and `Int8Vector`.
225
+
196
226
### Complex Types
197
227
198
228
#### Array
@@ -208,6 +238,35 @@ Array of scalar values:
208
238
}
209
239
```
210
240
241
+
#### ArrayOfVector
242
+
243
+
`DataType.ArrayOfVector` stores multiple vectors in a single field value. This is useful for documents split into chunks, multi-vector embeddings, or struct array payloads that contain vector arrays.
244
+
245
+
```javascript
246
+
{
247
+
name:'chunk_embeddings',
248
+
data_type:DataType.ArrayOfVector,
249
+
element_type:DataType.FloatVector,
250
+
dim:128,
251
+
max_capacity:32,
252
+
}
253
+
254
+
awaitclient.insert({
255
+
collection_name:'my_collection',
256
+
data: [
257
+
{
258
+
id:1,
259
+
chunk_embeddings: [
260
+
[/* first 128-d vector */],
261
+
[/* second 128-d vector */],
262
+
],
263
+
},
264
+
],
265
+
});
266
+
```
267
+
268
+
Supported element vector types include dense, binary, float16, bfloat16, sparse, and int8 vector payloads where supported by Milvus.
269
+
211
270
#### Struct
212
271
213
272
Nested structure:
@@ -237,6 +296,9 @@ Each field in a collection schema must include:
237
296
autoID:false, // Optional: auto-generate IDs
238
297
max_length:256, // Required for VarChar
239
298
dim:128, // Required for vector types
299
+
nullable:false, // Optional: allow null values
300
+
default_value:undefined, // Optional scalar default value
301
+
external_field:undefined, // Optional: source field name for external collections
240
302
}
241
303
```
242
304
@@ -364,9 +426,11 @@ await client.insert({
364
426
collection_name:'my_collection',
365
427
data: [
366
428
{
367
-
vector: [/* ... */],
429
+
vector: [
430
+
/* ... */
431
+
],
368
432
dynamic_field_1:'value1', // Automatically added
369
-
dynamic_field_2:123, // Automatically added
433
+
dynamic_field_2:123, // Automatically added
370
434
},
371
435
],
372
436
});
@@ -395,4 +459,3 @@ The SDK validates schemas before creating collections. Common validation errors:
395
459
- Learn about [Collection Management](./collection-management)
0 commit comments