@lowdefy/connection-elasticsearch 4.0.0-rc.8 → 4.0.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/dist/connections/Elasticsearch/Elasticsearch.js +1 -1
- package/dist/connections/Elasticsearch/ElasticsearchDelete/ElasticsearchDelete.js +3 -3
- package/dist/connections/Elasticsearch/ElasticsearchDelete/schema.js +1 -1
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.js +3 -3
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/schema.js +1 -1
- package/dist/connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.js +3 -3
- package/dist/connections/Elasticsearch/ElasticsearchIndex/schema.js +1 -1
- package/dist/connections/Elasticsearch/ElasticsearchSearch/ElasticsearchSearch.js +4 -4
- package/dist/connections/Elasticsearch/ElasticsearchSearch/schema.js +1 -1
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/ElasticsearchUpdate.js +3 -3
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/schema.js +1 -1
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.js +3 -3
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/schema.js +1 -1
- package/dist/connections/Elasticsearch/schema.js +1 -1
- package/dist/connections.js +1 -1
- package/dist/types.js +1 -1
- package/package.json +15 -17
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { Client } from '@elastic/elasticsearch';
|
|
16
16
|
import schema from './schema.js';
|
|
17
|
-
async function ElasticsearchDelete({ request
|
|
17
|
+
async function ElasticsearchDelete({ request, connection }) {
|
|
18
18
|
const client = new Client(connection);
|
|
19
|
-
const { body: response
|
|
19
|
+
const { body: response } = await client.delete({
|
|
20
20
|
...request,
|
|
21
21
|
index: request.index || connection.index
|
|
22
22
|
});
|
package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { Client } from '@elastic/elasticsearch';
|
|
16
16
|
import schema from './schema.js';
|
|
17
|
-
async function ElasticsearchDeleteByQuery({ request
|
|
17
|
+
async function ElasticsearchDeleteByQuery({ request, connection }) {
|
|
18
18
|
const client = new Client(connection);
|
|
19
|
-
const { body: response
|
|
19
|
+
const { body: response } = await client.deleteByQuery({
|
|
20
20
|
...request,
|
|
21
21
|
index: request.index || connection.index
|
|
22
22
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { Client } from '@elastic/elasticsearch';
|
|
16
16
|
import schema from './schema.js';
|
|
17
|
-
async function ElasticsearchIndex({ request
|
|
17
|
+
async function ElasticsearchIndex({ request, connection }) {
|
|
18
18
|
const client = new Client(connection);
|
|
19
19
|
const body = {
|
|
20
20
|
...request,
|
|
21
21
|
index: request.index || connection.index
|
|
22
22
|
};
|
|
23
|
-
const { body: response
|
|
23
|
+
const { body: response } = await client.index(body);
|
|
24
24
|
return {
|
|
25
25
|
response,
|
|
26
26
|
id: response._id
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/ import { Client } from '@elastic/elasticsearch';
|
|
16
16
|
import { get } from '@lowdefy/helpers';
|
|
17
17
|
import schema from './schema.js';
|
|
18
|
-
async function ElasticsearchSearch({ request
|
|
18
|
+
async function ElasticsearchSearch({ request, connection }) {
|
|
19
19
|
const client = new Client(connection);
|
|
20
|
-
const { body: response
|
|
20
|
+
const { body: response } = await client.search({
|
|
21
21
|
...request,
|
|
22
22
|
index: request.index || connection.index
|
|
23
23
|
});
|
|
@@ -29,7 +29,7 @@ async function ElasticsearchSearch({ request , connection }) {
|
|
|
29
29
|
// We return the results in the _source field as the main results
|
|
30
30
|
// and return all other fields in the _meta field.
|
|
31
31
|
const hits = rawHits.map((hit)=>{
|
|
32
|
-
const { _source
|
|
32
|
+
const { _source, ..._meta } = hit;
|
|
33
33
|
return {
|
|
34
34
|
..._source,
|
|
35
35
|
_meta
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { Client } from '@elastic/elasticsearch';
|
|
16
16
|
import schema from './schema.js';
|
|
17
|
-
async function ElasticsearchUpdate({ request
|
|
17
|
+
async function ElasticsearchUpdate({ request, connection }) {
|
|
18
18
|
const client = new Client(connection);
|
|
19
|
-
const { body: response
|
|
19
|
+
const { body: response } = await client.update({
|
|
20
20
|
...request,
|
|
21
21
|
index: request.index || connection.index
|
|
22
22
|
});
|
package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import { Client } from '@elastic/elasticsearch';
|
|
16
16
|
import schema from './schema.js';
|
|
17
|
-
async function ElasticsearchUpdateByQuery({ request
|
|
17
|
+
async function ElasticsearchUpdateByQuery({ request, connection }) {
|
|
18
18
|
const client = new Client(connection);
|
|
19
|
-
const { body: response
|
|
19
|
+
const { body: response } = await client.updateByQuery({
|
|
20
20
|
...request,
|
|
21
21
|
index: request.index || connection.index
|
|
22
22
|
});
|
package/dist/connections.js
CHANGED
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/connection-elasticsearch",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -34,26 +34,24 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"dist/*"
|
|
36
36
|
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
|
39
|
-
"clean": "rm -rf dist",
|
|
40
|
-
"prepublishOnly": "pnpm build",
|
|
41
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
42
|
-
},
|
|
43
37
|
"dependencies": {
|
|
44
|
-
"@elastic/elasticsearch": "7.
|
|
45
|
-
"@lowdefy/helpers": "4.0.0
|
|
38
|
+
"@elastic/elasticsearch": "7.17.12",
|
|
39
|
+
"@lowdefy/helpers": "4.0.0"
|
|
46
40
|
},
|
|
47
41
|
"devDependencies": {
|
|
48
|
-
"@jest/globals": "28.1.
|
|
49
|
-
"@lowdefy/ajv": "4.0.0
|
|
50
|
-
"@swc/cli": "0.1.
|
|
51
|
-
"@swc/core": "1.3.
|
|
52
|
-
"@swc/jest": "0.2.
|
|
53
|
-
"jest": "28.1.
|
|
42
|
+
"@jest/globals": "28.1.3",
|
|
43
|
+
"@lowdefy/ajv": "4.0.0",
|
|
44
|
+
"@swc/cli": "0.1.63",
|
|
45
|
+
"@swc/core": "1.3.99",
|
|
46
|
+
"@swc/jest": "0.2.29",
|
|
47
|
+
"jest": "28.1.3"
|
|
54
48
|
},
|
|
55
49
|
"publishConfig": {
|
|
56
50
|
"access": "public"
|
|
57
51
|
},
|
|
58
|
-
"
|
|
59
|
-
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start --copy-files",
|
|
54
|
+
"clean": "rm -rf dist",
|
|
55
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
56
|
+
}
|
|
57
|
+
}
|