@travetto/model-elasticsearch 3.3.7 → 3.4.0-rc.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/package.json +6 -6
- package/src/service.ts +14 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-elasticsearch",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-rc.0",
|
|
4
4
|
"description": "Elasticsearch backing for the travetto model module, with real-time modeling support for Elasticsearch mappings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"elasticsearch",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"directory": "module/model-elasticsearch"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@elastic/elasticsearch": "^8.
|
|
31
|
-
"@travetto/config": "^3.
|
|
32
|
-
"@travetto/model": "^3.
|
|
33
|
-
"@travetto/model-query": "^3.
|
|
30
|
+
"@elastic/elasticsearch": "^8.10.0",
|
|
31
|
+
"@travetto/config": "^3.4.0-rc.0",
|
|
32
|
+
"@travetto/model": "^3.4.0-rc.0",
|
|
33
|
+
"@travetto/model-query": "^3.4.0-rc.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@travetto/command": "^3.
|
|
36
|
+
"@travetto/command": "^3.4.0-rc.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@travetto/command": {
|
package/src/service.ts
CHANGED
|
@@ -219,14 +219,21 @@ export class ElasticsearchModelService implements
|
|
|
219
219
|
|
|
220
220
|
console.debug('Partial Script', { script });
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
222
|
+
try {
|
|
223
|
+
await this.client.update({
|
|
224
|
+
...this.manager.getIdentity(cls),
|
|
225
|
+
id,
|
|
226
|
+
refresh: true,
|
|
227
|
+
body: {
|
|
228
|
+
script
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
} catch (err) {
|
|
232
|
+
if (err instanceof Error && /document_missing_exception/.test(err.message)) {
|
|
233
|
+
throw new NotFoundError(cls, id);
|
|
228
234
|
}
|
|
229
|
-
|
|
235
|
+
throw err;
|
|
236
|
+
}
|
|
230
237
|
|
|
231
238
|
return this.get(cls, id);
|
|
232
239
|
}
|