kuzzle 2.55.0 → 2.56.0-beta.2
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/dist/lib/api/controllers/documentController.js +4 -0
- package/dist/lib/config/default.config.js +2 -10
- package/dist/lib/types/config/SecurityConfiguration.d.ts +1 -1
- package/dist/lib/types/config/storageEngine/StorageEngineElasticsearchConfiguration.d.ts +18 -18
- package/dist/lib/util/dump-collection.js +7 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -175,9 +175,13 @@ class DocumentController extends NativeController {
|
|
|
175
175
|
const format = request.getString("format", "jsonl");
|
|
176
176
|
const separator = request.getString("separator", ",");
|
|
177
177
|
const query = request.getObjectFromBodyOrArgs("query", {});
|
|
178
|
+
const collapse = request.getObjectFromBodyOrArgs("collapse");
|
|
178
179
|
const fields = request.getArrayFromBodyOrArgs("fields", []);
|
|
179
180
|
const fieldsName = request.getObjectFromBodyOrArgs("fieldsName", {});
|
|
180
181
|
const searchBody = { query };
|
|
182
|
+
if (collapse) {
|
|
183
|
+
searchBody.collapse = collapse;
|
|
184
|
+
}
|
|
181
185
|
if (request.context.connection.protocol !== "http") {
|
|
182
186
|
throw kerror.get("api", "assert", "unsupported_protocol", request.context.connection.protocol, "document:export");
|
|
183
187
|
}
|
|
@@ -304,7 +304,6 @@ const defaultConfig = {
|
|
|
304
304
|
collections: {
|
|
305
305
|
users: {
|
|
306
306
|
settings: {
|
|
307
|
-
// @deprecated : replace undefined by 1
|
|
308
307
|
number_of_shards: undefined,
|
|
309
308
|
number_of_replicas: undefined,
|
|
310
309
|
},
|
|
@@ -317,7 +316,6 @@ const defaultConfig = {
|
|
|
317
316
|
},
|
|
318
317
|
profiles: {
|
|
319
318
|
settings: {
|
|
320
|
-
// @deprecated : replace undefined by 1
|
|
321
319
|
number_of_shards: undefined,
|
|
322
320
|
number_of_replicas: undefined,
|
|
323
321
|
},
|
|
@@ -342,7 +340,6 @@ const defaultConfig = {
|
|
|
342
340
|
},
|
|
343
341
|
roles: {
|
|
344
342
|
settings: {
|
|
345
|
-
// @deprecated : replace undefined by 1
|
|
346
343
|
number_of_shards: undefined,
|
|
347
344
|
number_of_replicas: undefined,
|
|
348
345
|
},
|
|
@@ -359,7 +356,6 @@ const defaultConfig = {
|
|
|
359
356
|
},
|
|
360
357
|
validations: {
|
|
361
358
|
settings: {
|
|
362
|
-
// @deprecated : replace undefined by 1
|
|
363
359
|
number_of_shards: undefined,
|
|
364
360
|
number_of_replicas: undefined,
|
|
365
361
|
},
|
|
@@ -376,7 +372,6 @@ const defaultConfig = {
|
|
|
376
372
|
},
|
|
377
373
|
config: {
|
|
378
374
|
settings: {
|
|
379
|
-
// @deprecated : replace undefined by 1
|
|
380
375
|
number_of_shards: undefined,
|
|
381
376
|
number_of_replicas: undefined,
|
|
382
377
|
},
|
|
@@ -387,7 +382,6 @@ const defaultConfig = {
|
|
|
387
382
|
},
|
|
388
383
|
"api-keys": {
|
|
389
384
|
settings: {
|
|
390
|
-
// @deprecated : replace undefined by 1
|
|
391
385
|
number_of_shards: undefined,
|
|
392
386
|
number_of_replicas: undefined,
|
|
393
387
|
},
|
|
@@ -405,7 +399,6 @@ const defaultConfig = {
|
|
|
405
399
|
},
|
|
406
400
|
installations: {
|
|
407
401
|
settings: {
|
|
408
|
-
// @deprecated : replace undefined by 1
|
|
409
402
|
number_of_shards: undefined,
|
|
410
403
|
number_of_replicas: undefined,
|
|
411
404
|
},
|
|
@@ -420,9 +413,8 @@ const defaultConfig = {
|
|
|
420
413
|
},
|
|
421
414
|
imports: {
|
|
422
415
|
settings: {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
number_of_replicas: 1,
|
|
416
|
+
number_of_shards: undefined,
|
|
417
|
+
number_of_replicas: undefined,
|
|
426
418
|
},
|
|
427
419
|
mappings: {
|
|
428
420
|
dynamic: "strict",
|
|
@@ -111,11 +111,11 @@ export type StorageEngineElasticsearch = {
|
|
|
111
111
|
/**
|
|
112
112
|
* @default 1
|
|
113
113
|
*/
|
|
114
|
-
number_of_shards: number;
|
|
114
|
+
number_of_shards: number | undefined;
|
|
115
115
|
/**
|
|
116
116
|
* @default 1
|
|
117
117
|
*/
|
|
118
|
-
number_of_replicas: number;
|
|
118
|
+
number_of_replicas: number | undefined;
|
|
119
119
|
};
|
|
120
120
|
internalIndex: {
|
|
121
121
|
/**
|
|
@@ -128,11 +128,11 @@ export type StorageEngineElasticsearch = {
|
|
|
128
128
|
/**
|
|
129
129
|
* @default 1
|
|
130
130
|
*/
|
|
131
|
-
number_of_shards: number;
|
|
131
|
+
number_of_shards: number | undefined;
|
|
132
132
|
/**
|
|
133
133
|
* @default 1
|
|
134
134
|
*/
|
|
135
|
-
number_of_replicas: number;
|
|
135
|
+
number_of_replicas: number | undefined;
|
|
136
136
|
};
|
|
137
137
|
mappings: {
|
|
138
138
|
/**
|
|
@@ -160,11 +160,11 @@ export type StorageEngineElasticsearch = {
|
|
|
160
160
|
/**
|
|
161
161
|
* @default 1
|
|
162
162
|
*/
|
|
163
|
-
number_of_shards: number;
|
|
163
|
+
number_of_shards: number | undefined;
|
|
164
164
|
/**
|
|
165
165
|
* @default 1
|
|
166
166
|
*/
|
|
167
|
-
number_of_replicas: number;
|
|
167
|
+
number_of_replicas: number | undefined;
|
|
168
168
|
};
|
|
169
169
|
mappings: {
|
|
170
170
|
dynamic: "false";
|
|
@@ -198,11 +198,11 @@ export type StorageEngineElasticsearch = {
|
|
|
198
198
|
/**
|
|
199
199
|
* @default 1
|
|
200
200
|
*/
|
|
201
|
-
number_of_shards: number;
|
|
201
|
+
number_of_shards: number | undefined;
|
|
202
202
|
/**
|
|
203
203
|
* @default 1
|
|
204
204
|
*/
|
|
205
|
-
number_of_replicas: number;
|
|
205
|
+
number_of_replicas: number | undefined;
|
|
206
206
|
};
|
|
207
207
|
mappings: {
|
|
208
208
|
dynamic: "false";
|
|
@@ -222,11 +222,11 @@ export type StorageEngineElasticsearch = {
|
|
|
222
222
|
/**
|
|
223
223
|
* @default 1
|
|
224
224
|
*/
|
|
225
|
-
number_of_shards: number;
|
|
225
|
+
number_of_shards: number | undefined;
|
|
226
226
|
/**
|
|
227
227
|
* @default 1
|
|
228
228
|
*/
|
|
229
|
-
number_of_replicas: number;
|
|
229
|
+
number_of_replicas: number | undefined;
|
|
230
230
|
};
|
|
231
231
|
mappings: {
|
|
232
232
|
properties: {
|
|
@@ -248,11 +248,11 @@ export type StorageEngineElasticsearch = {
|
|
|
248
248
|
/**
|
|
249
249
|
* @default 1
|
|
250
250
|
*/
|
|
251
|
-
number_of_shards: number;
|
|
251
|
+
number_of_shards: number | undefined;
|
|
252
252
|
/**
|
|
253
253
|
* @default 1
|
|
254
254
|
*/
|
|
255
|
-
number_of_replicas: number;
|
|
255
|
+
number_of_replicas: number | undefined;
|
|
256
256
|
};
|
|
257
257
|
mappings: {
|
|
258
258
|
dynamic: "false";
|
|
@@ -264,11 +264,11 @@ export type StorageEngineElasticsearch = {
|
|
|
264
264
|
/**
|
|
265
265
|
* @default 1
|
|
266
266
|
*/
|
|
267
|
-
number_of_shards: number;
|
|
267
|
+
number_of_shards: number | undefined;
|
|
268
268
|
/**
|
|
269
269
|
* @default 1
|
|
270
270
|
*/
|
|
271
|
-
number_of_replicas: number;
|
|
271
|
+
number_of_replicas: number | undefined;
|
|
272
272
|
};
|
|
273
273
|
mappings: {
|
|
274
274
|
dynamic: "false";
|
|
@@ -299,11 +299,11 @@ export type StorageEngineElasticsearch = {
|
|
|
299
299
|
/**
|
|
300
300
|
* @default 1
|
|
301
301
|
*/
|
|
302
|
-
number_of_shards: number;
|
|
302
|
+
number_of_shards: number | undefined;
|
|
303
303
|
/**
|
|
304
304
|
* @default 1
|
|
305
305
|
*/
|
|
306
|
-
number_of_replicas: number;
|
|
306
|
+
number_of_replicas: number | undefined;
|
|
307
307
|
};
|
|
308
308
|
mappings: {
|
|
309
309
|
dynamic: "strict";
|
|
@@ -325,11 +325,11 @@ export type StorageEngineElasticsearch = {
|
|
|
325
325
|
/**
|
|
326
326
|
* @default 1
|
|
327
327
|
*/
|
|
328
|
-
number_of_shards: number;
|
|
328
|
+
number_of_shards: number | undefined;
|
|
329
329
|
/**
|
|
330
330
|
* @default 1
|
|
331
331
|
*/
|
|
332
|
-
number_of_replicas: number;
|
|
332
|
+
number_of_replicas: number | undefined;
|
|
333
333
|
};
|
|
334
334
|
mappings: {
|
|
335
335
|
dynamic: "strict";
|
|
@@ -123,7 +123,7 @@ class AbstractDumper {
|
|
|
123
123
|
fieldsName: {},
|
|
124
124
|
scroll: "5s",
|
|
125
125
|
separator: ",",
|
|
126
|
-
size:
|
|
126
|
+
size: 1000,
|
|
127
127
|
}) {
|
|
128
128
|
this.index = index;
|
|
129
129
|
this.collection = collection;
|
|
@@ -133,6 +133,12 @@ class AbstractDumper {
|
|
|
133
133
|
if (!writeStream) {
|
|
134
134
|
throw kerror.get("api", "assert", "missing_argument", "writeStream");
|
|
135
135
|
}
|
|
136
|
+
if (query.collapse) {
|
|
137
|
+
globalThis.kuzzle.log
|
|
138
|
+
.child("CSV-dump")
|
|
139
|
+
.warn("The 'collapse' option is not compatible with scrolling. Disabling scroll.");
|
|
140
|
+
delete this.options.scroll;
|
|
141
|
+
}
|
|
136
142
|
}
|
|
137
143
|
/**
|
|
138
144
|
* One-shot call before the dump. Can be used to
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kuzzle",
|
|
3
3
|
"author": "The Kuzzle Team <support@kuzzle.io>",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.56.0-beta.2",
|
|
5
5
|
"description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rm -Rf ./dist && tsc && node ./bin/copy-binaries.js",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kuzzle",
|
|
3
3
|
"author": "The Kuzzle Team <support@kuzzle.io>",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.56.0-beta.2",
|
|
5
5
|
"description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rm -Rf ./dist && tsc && node ./bin/copy-binaries.js",
|