kuzzle 2.19.7 → 2.19.9
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/lib/api/controllers/baseController.js +0 -6
- package/lib/config/default.config.js +4 -0
- package/lib/service/storage/elasticsearch.js +10 -2
- package/lib/service/storage/queryTranslator.js +3 -2
- package/lib/types/config/storageEngine/StorageEngineElasticsearchConfiguration.d.ts +18 -0
- package/package.json +2 -2
|
@@ -85,12 +85,6 @@ class NativeController extends BaseController {
|
|
|
85
85
|
throw assertionError.get("invalid_type", "body.query", "object");
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
try {
|
|
89
|
-
global.kuzzle.koncorde.validate(koncordeFilters);
|
|
90
|
-
} catch (error) {
|
|
91
|
-
throw assertionError.getFrom(error, "koncorde_dsl_error", error.message);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
88
|
try {
|
|
95
89
|
return await this.ask("core:storage:public:translate", koncordeFilters);
|
|
96
90
|
} catch (error) {
|
|
@@ -1395,6 +1395,14 @@ class ElasticSearch extends Service {
|
|
|
1395
1395
|
),
|
|
1396
1396
|
};
|
|
1397
1397
|
|
|
1398
|
+
esRequest.body.settings.number_of_replicas =
|
|
1399
|
+
esRequest.body.settings.number_of_replicas ||
|
|
1400
|
+
this.config.defaultSettings.number_of_replicas;
|
|
1401
|
+
|
|
1402
|
+
esRequest.body.settings.number_of_shards =
|
|
1403
|
+
esRequest.body.settings.number_of_shards ||
|
|
1404
|
+
this.config.defaultSettings.number_of_shards;
|
|
1405
|
+
|
|
1398
1406
|
try {
|
|
1399
1407
|
await this._client.indices.create(esRequest);
|
|
1400
1408
|
} catch (error) {
|
|
@@ -3141,8 +3149,8 @@ class ElasticSearch extends Service {
|
|
|
3141
3149
|
[this._getAlias(index, HIDDEN_COLLECTION)]: {},
|
|
3142
3150
|
},
|
|
3143
3151
|
settings: {
|
|
3144
|
-
number_of_replicas:
|
|
3145
|
-
number_of_shards:
|
|
3152
|
+
number_of_replicas: this.config.defaultSettings.number_of_replicas,
|
|
3153
|
+
number_of_shards: this.config.defaultSettings.number_of_shards,
|
|
3146
3154
|
},
|
|
3147
3155
|
},
|
|
3148
3156
|
index: await this._getAvailableIndice(index, HIDDEN_COLLECTION),
|
|
@@ -84,7 +84,6 @@ const KONCORDE_CLAUSES_TO_ES = {
|
|
|
84
84
|
...content,
|
|
85
85
|
},
|
|
86
86
|
}),
|
|
87
|
-
regexp: undefined,
|
|
88
87
|
};
|
|
89
88
|
|
|
90
89
|
const KONCORDE_OPERATORS_TO_ES = {
|
|
@@ -145,7 +144,9 @@ class QueryTranslator {
|
|
|
145
144
|
const converter = KONCORDE_CLAUSES_TO_ES[clause];
|
|
146
145
|
|
|
147
146
|
if (converter === undefined) {
|
|
148
|
-
|
|
147
|
+
return {
|
|
148
|
+
[clause]: content,
|
|
149
|
+
};
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
return converter(content);
|
|
@@ -95,6 +95,24 @@ export declare type StorageEngineElasticsearch = {
|
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* Global settings to apply by default (if not overridden by user request ones)
|
|
100
|
+
* @default
|
|
101
|
+
* {
|
|
102
|
+
* number_of_shards: 1,
|
|
103
|
+
* number_of_replicas: 1
|
|
104
|
+
* }
|
|
105
|
+
*/
|
|
106
|
+
defaultSettings: {
|
|
107
|
+
/**
|
|
108
|
+
* @default 1
|
|
109
|
+
*/
|
|
110
|
+
number_of_shards: number;
|
|
111
|
+
/**
|
|
112
|
+
* @default 1
|
|
113
|
+
*/
|
|
114
|
+
number_of_replicas: number;
|
|
115
|
+
};
|
|
98
116
|
internalIndex: {
|
|
99
117
|
/**
|
|
100
118
|
* @default "kuzzle"
|
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.19.
|
|
4
|
+
"version": "2.19.9",
|
|
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
|
"bin": "bin/start-kuzzle-server",
|
|
7
7
|
"scripts": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"winston-syslog": "^2.6.0",
|
|
84
84
|
"winston-transport": "^4.5.0",
|
|
85
85
|
"yargs": "^17.5.1",
|
|
86
|
-
"zeromq": "
|
|
86
|
+
"zeromq": "6.0.0-beta.6"
|
|
87
87
|
},
|
|
88
88
|
"repository": {
|
|
89
89
|
"type": "git",
|