aws-v3-sdk 1.0.29 → 1.0.31

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.
@@ -48,7 +48,7 @@ exports.sendAuditsReqToES = async (method, index, type, id, data) => {
48
48
  index,
49
49
  type,
50
50
  body: data,
51
- refresh: true
51
+ refresh: false
52
52
 
53
53
  })
54
54
  return response.body
@@ -28,7 +28,8 @@ const getClient = async () => {
28
28
  const cred = createAwsConnector(credentials, REGION)
29
29
  return new Client({
30
30
  ...cred,
31
- node: host
31
+ node: host,
32
+ maxRetries: 0
32
33
  })
33
34
  }
34
35
 
@@ -39,7 +40,8 @@ exports.sendReqToES = async (method, index, type, id, data) => {
39
40
  const response = await client.delete({
40
41
  index,
41
42
  type,
42
- id
43
+ id,
44
+ refresh: false
43
45
  })
44
46
  return response.body
45
47
  } else if (method === 'UPDATE') {
@@ -48,7 +50,17 @@ exports.sendReqToES = async (method, index, type, id, data) => {
48
50
  index,
49
51
  type,
50
52
  body: data,
51
- refresh: true
53
+ refresh: false,
54
+ retry_on_conflict: 10
55
+ })
56
+ return response.body
57
+ } else if (method === 'UPDATE_BY_QUERY') {
58
+ const response = await client.updateByQuery({
59
+ index,
60
+ type,
61
+ body: data,
62
+ refresh: false,
63
+ retry_on_conflict: 10
52
64
  })
53
65
  return response.body
54
66
  } else {
@@ -57,7 +69,7 @@ exports.sendReqToES = async (method, index, type, id, data) => {
57
69
  index,
58
70
  type,
59
71
  body: data,
60
- refresh: true
72
+ refresh: false
61
73
  })
62
74
  return response.body
63
75
  }
@@ -52,7 +52,7 @@ exports.sendGetRequest = async (index, query, from, size, sort, _source) => {
52
52
  options.size = size
53
53
  }
54
54
  if (_source) {
55
- options._source = size
55
+ options._source = _source
56
56
  }
57
57
  client.search(options).then(response => {
58
58
  logger.debug(response, { response })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-v3-sdk",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "AWS v3 SDK Utils",
5
5
  "main": "index.js",
6
6
  "scripts": {