@lowdefy/connection-elasticsearch 0.0.0-experimental-20251010122007 → 0.0.0-experimental-20251015143743
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/LICENSE +183 -183
- package/package.json +3 -3
- package/dist/connections/Elasticsearch/ElasticsearchDelete/documentation.md +0 -130
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/documentation.md +0 -285
- package/dist/connections/Elasticsearch/ElasticsearchIndex/documentation.md +0 -159
- package/dist/connections/Elasticsearch/ElasticsearchSearch/documentation.md +0 -502
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/documentation.md +0 -258
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/documentation.md +0 -296
- package/dist/connections/Elasticsearch/documentation.md +0 -533
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
<TITLE>
|
|
2
|
-
ElasticsearchUpdate
|
|
3
|
-
</TITLE>
|
|
4
|
-
|
|
5
|
-
<DESCRIPTION>
|
|
6
|
-
|
|
7
|
-
The `ElasticsearchUpdate` request updates a document using a script or partial document.
|
|
8
|
-
|
|
9
|
-
### Properties
|
|
10
|
-
|
|
11
|
-
- `id: string|number` Unique identifier for the document to be updated.
|
|
12
|
-
- `body: object` The Elasticsearch request body contains either a [script](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting-using.html) or a `doc` property with fields to update.
|
|
13
|
-
- `if_seq_no: number` Only perform the operation if the document has this sequence number. See [Optimistic concurrency control](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#optimistic-concurrency-control-index).
|
|
14
|
-
- `if_primary_term: number` Only perform the operation if the document has this primary term. See [Optimistic concurrency control](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#optimistic-concurrency-control-index).
|
|
15
|
-
- `require_alias: boolean` If `true`, the destination must be an [index alias](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/alias.html). Defaults to `false`.
|
|
16
|
-
- `refresh: string|boolean` If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. Default: `false`.
|
|
17
|
-
- `retry_on_conflict: boolean` Specify how many times should the operation be retried when a conflict occurs. Default: `0`.
|
|
18
|
-
- `routing: string` Custom value used to route operations to a specific shard.
|
|
19
|
-
- `_source: string[]|boolean` Set to `false` to disable source retrieval (default: `true`). You can also specify a comma-separated list of the fields you want to retrieve.
|
|
20
|
-
- `_source_excludes: string[]` Specify the source fields you want to exclude.
|
|
21
|
-
- `_source_includes: string[]` Specify the source fields you want to include.
|
|
22
|
-
- `timeout: string` Period the request waits for the following operations:
|
|
23
|
-
- [Dynamic mapping](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/dynamic-mapping.html) updates
|
|
24
|
-
- [Waiting for active shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards)
|
|
25
|
-
Defaults to `1m` (one minute). This guarantees Elasticsearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur.
|
|
26
|
-
- `wait_for_active_shards: string` The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). Default: `1`, the primary shard.
|
|
27
|
-
See [Active Shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards).
|
|
28
|
-
|
|
29
|
-
</DESCRIPTION>
|
|
30
|
-
|
|
31
|
-
<CONNECTION>
|
|
32
|
-
Elasticsearch
|
|
33
|
-
</CONNECTION>
|
|
34
|
-
|
|
35
|
-
<SCHEMA>
|
|
36
|
-
|
|
37
|
-
```js
|
|
38
|
-
export default {
|
|
39
|
-
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
40
|
-
title: 'Lowdefy Request Schema - ElasticsearchUpdate',
|
|
41
|
-
type: 'object',
|
|
42
|
-
description: 'Updates a document using the specified script.',
|
|
43
|
-
required: ['id', 'body'],
|
|
44
|
-
properties: {
|
|
45
|
-
id: {
|
|
46
|
-
anyOf: [
|
|
47
|
-
{
|
|
48
|
-
type: 'string',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
type: 'number',
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
description: 'Unique identifier for the document to be updated.',
|
|
55
|
-
},
|
|
56
|
-
index: {
|
|
57
|
-
type: 'string',
|
|
58
|
-
description:
|
|
59
|
-
"Name of the target index. By default, the index is created automatically if it doesn't exist. For more information, see Automatically create data streams and indices.",
|
|
60
|
-
},
|
|
61
|
-
if_seq_no: {
|
|
62
|
-
type: 'integer',
|
|
63
|
-
description:
|
|
64
|
-
'Only perform the operation if the document has this sequence number. See Optimistic concurrency control.',
|
|
65
|
-
},
|
|
66
|
-
if_primary_term: {
|
|
67
|
-
type: 'integer',
|
|
68
|
-
description:
|
|
69
|
-
'Only perform the operation if the document has this primary term. See Optimistic concurrency control.',
|
|
70
|
-
},
|
|
71
|
-
require_alias: {
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
description: 'If true, the destination must be an index alias. Defaults to false.',
|
|
74
|
-
default: false,
|
|
75
|
-
},
|
|
76
|
-
refresh: {
|
|
77
|
-
anyOf: [
|
|
78
|
-
{
|
|
79
|
-
type: 'string',
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
type: 'boolean',
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
description:
|
|
86
|
-
'If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. Valid values: true, false, wait_for. Default: false.',
|
|
87
|
-
enum: ['true', 'false', true, false, 'wait_for'],
|
|
88
|
-
default: false,
|
|
89
|
-
},
|
|
90
|
-
retry_on_conflict: {
|
|
91
|
-
type: 'integer',
|
|
92
|
-
description:
|
|
93
|
-
'Specify how many times should the operation be retried when a conflict occurs. Default: 0.',
|
|
94
|
-
default: 0,
|
|
95
|
-
},
|
|
96
|
-
routing: {
|
|
97
|
-
description: 'Custom value used to route operations to a specific shard.',
|
|
98
|
-
type: 'string',
|
|
99
|
-
},
|
|
100
|
-
_source: {
|
|
101
|
-
anyOf: [
|
|
102
|
-
{
|
|
103
|
-
type: 'boolean',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
type: 'array',
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
items: {
|
|
110
|
-
type: 'string',
|
|
111
|
-
},
|
|
112
|
-
description:
|
|
113
|
-
'Set to false to disable source retrieval (default: true). You can also specify a comma-separated list of the fields you want to retrieve.',
|
|
114
|
-
default: true,
|
|
115
|
-
},
|
|
116
|
-
_source_excludes: {
|
|
117
|
-
type: 'array',
|
|
118
|
-
items: {
|
|
119
|
-
type: 'string',
|
|
120
|
-
},
|
|
121
|
-
description: 'Specify the source fields you want to exclude.',
|
|
122
|
-
},
|
|
123
|
-
_source_includes: {
|
|
124
|
-
type: 'array',
|
|
125
|
-
items: {
|
|
126
|
-
type: 'string',
|
|
127
|
-
},
|
|
128
|
-
description: 'Specify the source fields you want to include.',
|
|
129
|
-
},
|
|
130
|
-
timeout: {
|
|
131
|
-
type: 'string',
|
|
132
|
-
description:
|
|
133
|
-
'Period to wait for the following operations:\n\nDynamic mapping updates\nWaiting for active shards\nDefaults to 1m (one minute). This guarantees Elasticsearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur.',
|
|
134
|
-
default: '1m',
|
|
135
|
-
},
|
|
136
|
-
wait_for_active_shards: {
|
|
137
|
-
type: 'string',
|
|
138
|
-
description:
|
|
139
|
-
'The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). Default: 1, the primary shard.',
|
|
140
|
-
default: '1',
|
|
141
|
-
},
|
|
142
|
-
body: {
|
|
143
|
-
description: 'The request definition requires either script or partial doc.',
|
|
144
|
-
anyOf: [
|
|
145
|
-
{
|
|
146
|
-
required: ['doc'],
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
required: ['script'],
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
properties: {
|
|
153
|
-
doc: {
|
|
154
|
-
additionalProperties: true,
|
|
155
|
-
description: 'Partial document to update',
|
|
156
|
-
},
|
|
157
|
-
script: {
|
|
158
|
-
$ref: '#/definitions/Script',
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
errorMessage: {
|
|
162
|
-
anyOf:
|
|
163
|
-
'ElasticsearchUpdate request should have required property "body.doc" or "body.script".',
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
definitions: {
|
|
168
|
-
Script: {
|
|
169
|
-
description: 'An Elasticsearch script.',
|
|
170
|
-
additionalProperties: false,
|
|
171
|
-
anyOf: [
|
|
172
|
-
{
|
|
173
|
-
required: ['source'],
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
required: ['id'],
|
|
177
|
-
},
|
|
178
|
-
],
|
|
179
|
-
properties: {
|
|
180
|
-
lang: {
|
|
181
|
-
type: 'string',
|
|
182
|
-
enum: ['painless', 'expression', 'mustache', 'java'],
|
|
183
|
-
description: 'Specifies the language the script is written in. Defaults to painless.',
|
|
184
|
-
default: 'painless',
|
|
185
|
-
},
|
|
186
|
-
source: {
|
|
187
|
-
description: 'The script itself, which you specify as source for an inline script.',
|
|
188
|
-
type: 'string',
|
|
189
|
-
},
|
|
190
|
-
id: {
|
|
191
|
-
description:
|
|
192
|
-
'The script itself, which you specify as id for a stored script. Use the stored script APIs to create and manage stored scripts.',
|
|
193
|
-
type: 'string',
|
|
194
|
-
},
|
|
195
|
-
params: {
|
|
196
|
-
description:
|
|
197
|
-
'Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.',
|
|
198
|
-
type: 'object',
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
errorMessage: {
|
|
202
|
-
anyOf:
|
|
203
|
-
'ElasticsearchUpdate request should have required property "body.script.source" or "body.script.id".',
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
errorMessage: {
|
|
208
|
-
type: 'ElasticsearchUpdate request properties should be an object.',
|
|
209
|
-
required: {
|
|
210
|
-
id: 'ElasticsearchUpdate request should have required property "id".',
|
|
211
|
-
body: 'ElasticsearchUpdate request should have required property "body".',
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
};
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
</SCHEMA>
|
|
218
|
-
|
|
219
|
-
<EXAMPLES>
|
|
220
|
-
|
|
221
|
-
### Update a document
|
|
222
|
-
|
|
223
|
-
```yaml
|
|
224
|
-
requests:
|
|
225
|
-
- id: update
|
|
226
|
-
type: ElasticsearchUpdate
|
|
227
|
-
payload:
|
|
228
|
-
id:
|
|
229
|
-
_state: _id
|
|
230
|
-
name:
|
|
231
|
-
_state: name
|
|
232
|
-
properties:
|
|
233
|
-
id:
|
|
234
|
-
_payload: id
|
|
235
|
-
body:
|
|
236
|
-
doc:
|
|
237
|
-
_payload: name
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### Increase the like counter using a script
|
|
241
|
-
|
|
242
|
-
```yaml
|
|
243
|
-
requests:
|
|
244
|
-
- id: increase_like_counter
|
|
245
|
-
type: ElasticsearchUpdate
|
|
246
|
-
payload:
|
|
247
|
-
id:
|
|
248
|
-
_state: _id
|
|
249
|
-
properties:
|
|
250
|
-
id:
|
|
251
|
-
_payload: id
|
|
252
|
-
body:
|
|
253
|
-
script:
|
|
254
|
-
source: |
|
|
255
|
-
ctx._source.likes++
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
</EXAMPLES>
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
<TITLE>
|
|
2
|
-
ElasticsearchUpdateByQuery
|
|
3
|
-
</TITLE>
|
|
4
|
-
|
|
5
|
-
<DESCRIPTION>
|
|
6
|
-
|
|
7
|
-
The `ElasticsearchUpdateByQuery` request updates documents that match the specified query. If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
|
|
8
|
-
|
|
9
|
-
### Properties
|
|
10
|
-
|
|
11
|
-
- `body: object` The Elasticsearch query body, expressed in the [JSON Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html).
|
|
12
|
-
- `query: object`: The Elasticsearch query.
|
|
13
|
-
- `script: object` A [script](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting-using.html) to update documents.
|
|
14
|
-
- `_source: string|string[]|boolean`: True or false to return the `_source` field or not, or a list of fields to return.
|
|
15
|
-
- `_source_excludes: string|string[]`: A list of fields to exclude from the returned `_source` field.
|
|
16
|
-
- `_source_includes: string|string[]`: A list of fields to extract and return from the `_source` field.
|
|
17
|
-
- `allow_no_indices: boolean`: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified).
|
|
18
|
-
- `max_docs: number` Maximum number of documents to process. Defaults to all documents.
|
|
19
|
-
- `refresh: string|boolean` If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. Default: `false`.
|
|
20
|
-
- `requests_per_second: number` The throttle for this request in sub-requests per second. Defaults to -1 (no throttle).
|
|
21
|
-
- `analyzer: string`: The analyzer to use for the query string
|
|
22
|
-
- `default_operator: string`: The default operator for query string query (AND or OR).
|
|
23
|
-
- `df: string`: The field to use as default where no field prefix is given in the query string.
|
|
24
|
-
- `from: number`: Starting offset.
|
|
25
|
-
- `size: number`: Number of hits to return.
|
|
26
|
-
- `index: string|string[]`: A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices.
|
|
27
|
-
- `lenient: boolean`: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.
|
|
28
|
-
- `scroll: string`: Specify how long a consistent view of the index should be maintained for scrolled search.
|
|
29
|
-
- `sort: string|string[]`: A comma-separated list of <field>:<direction> pairs.
|
|
30
|
-
|
|
31
|
-
The request accepts many more advanced configuration options. They will be passed to the Elasticsearch client verbatim, so check out the [available options](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-update-by-query.html#docs-update-by-query-api-query-params) provided by Elastic.
|
|
32
|
-
|
|
33
|
-
</DESCRIPTION>
|
|
34
|
-
|
|
35
|
-
<CONNECTION>
|
|
36
|
-
Elasticsearch
|
|
37
|
-
</CONNECTION>
|
|
38
|
-
|
|
39
|
-
<SCHEMA>
|
|
40
|
-
|
|
41
|
-
```js
|
|
42
|
-
export default {
|
|
43
|
-
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
44
|
-
title: 'Lowdefy Request Schema - ElasticsearchUpdateByQuery',
|
|
45
|
-
type: 'object',
|
|
46
|
-
description:
|
|
47
|
-
'Updates documents that match the specified query. If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.',
|
|
48
|
-
properties: {
|
|
49
|
-
index: {
|
|
50
|
-
type: 'string',
|
|
51
|
-
description: 'The name of the index.',
|
|
52
|
-
},
|
|
53
|
-
allow_no_indices: {
|
|
54
|
-
type: 'boolean',
|
|
55
|
-
description:
|
|
56
|
-
'If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.',
|
|
57
|
-
default: true,
|
|
58
|
-
},
|
|
59
|
-
analyzer: {
|
|
60
|
-
description: 'The analyzer to use for the query string.',
|
|
61
|
-
type: 'string',
|
|
62
|
-
},
|
|
63
|
-
analyze_wildcard: {
|
|
64
|
-
description: 'Specify whether wildcard and prefix queries should be analyzed.',
|
|
65
|
-
type: 'boolean',
|
|
66
|
-
default: false,
|
|
67
|
-
},
|
|
68
|
-
conflicts: {
|
|
69
|
-
type: 'string',
|
|
70
|
-
enum: ['abort', 'proceed'],
|
|
71
|
-
description:
|
|
72
|
-
'What to do if update by query hits version conflicts: abort or proceed. Defaults to abort.',
|
|
73
|
-
default: 'abort',
|
|
74
|
-
},
|
|
75
|
-
default_operator: {
|
|
76
|
-
description: 'The default operator for query string query (AND or OR).',
|
|
77
|
-
enum: ['AND', 'OR'],
|
|
78
|
-
type: 'string',
|
|
79
|
-
default: 'OR',
|
|
80
|
-
},
|
|
81
|
-
df: {
|
|
82
|
-
description:
|
|
83
|
-
'The field to use as default where no field prefix is given in the query string.',
|
|
84
|
-
type: 'string',
|
|
85
|
-
},
|
|
86
|
-
expand_wildcards: {
|
|
87
|
-
description:
|
|
88
|
-
'Whether to expand wildcard expression to concrete indices that are open, closed or both.',
|
|
89
|
-
enum: ['all', 'closed', 'hidden', 'none', 'open'],
|
|
90
|
-
type: 'string',
|
|
91
|
-
default: 'open',
|
|
92
|
-
},
|
|
93
|
-
from: {
|
|
94
|
-
description: 'Starting offset.',
|
|
95
|
-
type: 'number',
|
|
96
|
-
default: 0,
|
|
97
|
-
},
|
|
98
|
-
ignore_unavailable: {
|
|
99
|
-
description:
|
|
100
|
-
'Whether specified concrete indices should be ignored when unavailable (missing or closed)',
|
|
101
|
-
type: 'boolean',
|
|
102
|
-
},
|
|
103
|
-
lenient: {
|
|
104
|
-
description:
|
|
105
|
-
'Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.',
|
|
106
|
-
type: 'boolean',
|
|
107
|
-
},
|
|
108
|
-
max_docs: {
|
|
109
|
-
type: 'integer',
|
|
110
|
-
description: 'Maximum number of documents to process. Defaults to all documents.',
|
|
111
|
-
},
|
|
112
|
-
pipeline: {
|
|
113
|
-
type: 'string',
|
|
114
|
-
description: 'ID of the pipeline to use to preprocess incoming documents.',
|
|
115
|
-
},
|
|
116
|
-
preference: {
|
|
117
|
-
description: 'Specify the node or shard the operation should be performed on.',
|
|
118
|
-
type: 'string',
|
|
119
|
-
default: 'random',
|
|
120
|
-
},
|
|
121
|
-
pretty: {
|
|
122
|
-
description: 'Pretty format the returned JSON response.',
|
|
123
|
-
type: 'boolean',
|
|
124
|
-
},
|
|
125
|
-
q: {
|
|
126
|
-
description: 'Query in the Lucene query string syntax.',
|
|
127
|
-
type: 'string',
|
|
128
|
-
},
|
|
129
|
-
request_cache: {
|
|
130
|
-
description:
|
|
131
|
-
'Specify if request cache should be used for this request or not, defaults to index level setting.',
|
|
132
|
-
type: 'boolean',
|
|
133
|
-
},
|
|
134
|
-
refresh: {
|
|
135
|
-
anyOf: [
|
|
136
|
-
{
|
|
137
|
-
type: 'string',
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
type: 'boolean',
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
description:
|
|
144
|
-
'If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. Defaults to false.',
|
|
145
|
-
enum: ['true', 'false', true, false, 'wait_for'],
|
|
146
|
-
default: false,
|
|
147
|
-
},
|
|
148
|
-
requests_per_second: {
|
|
149
|
-
type: 'integer',
|
|
150
|
-
description:
|
|
151
|
-
'The throttle for this request in sub-requests per second. Defaults to -1 (no throttle).',
|
|
152
|
-
default: -1,
|
|
153
|
-
},
|
|
154
|
-
routing: {
|
|
155
|
-
type: 'string',
|
|
156
|
-
description: 'Custom value used to route operations to a specific shard.',
|
|
157
|
-
},
|
|
158
|
-
scroll: {
|
|
159
|
-
type: 'string',
|
|
160
|
-
description: 'Period to retain the search context for scrolling. See Scroll search results.',
|
|
161
|
-
},
|
|
162
|
-
scroll_size: {
|
|
163
|
-
type: 'integer',
|
|
164
|
-
description: 'Size on the scroll request powering the update by query. Defaults to 100.',
|
|
165
|
-
default: 100,
|
|
166
|
-
},
|
|
167
|
-
search_type: {
|
|
168
|
-
description: 'Search operation type.',
|
|
169
|
-
enum: ['dfs_query_then_fetch', 'query_then_fetch'],
|
|
170
|
-
type: 'string',
|
|
171
|
-
},
|
|
172
|
-
search_timeout: {
|
|
173
|
-
type: 'string',
|
|
174
|
-
description: 'Explicit timeout for each search request. Defaults to no timeout.',
|
|
175
|
-
},
|
|
176
|
-
slices: {
|
|
177
|
-
type: 'integer',
|
|
178
|
-
description:
|
|
179
|
-
"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.",
|
|
180
|
-
},
|
|
181
|
-
sort: {
|
|
182
|
-
description: 'A comma-separated list of <field>:<direction> pairs.',
|
|
183
|
-
examples: ['name:asc', ['rating:asc', 'created_at:desc']],
|
|
184
|
-
anyOf: [
|
|
185
|
-
{
|
|
186
|
-
items: {
|
|
187
|
-
type: 'string',
|
|
188
|
-
},
|
|
189
|
-
type: 'array',
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
type: 'string',
|
|
193
|
-
},
|
|
194
|
-
],
|
|
195
|
-
},
|
|
196
|
-
_source: {
|
|
197
|
-
anyOf: [
|
|
198
|
-
{
|
|
199
|
-
type: 'boolean',
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
type: 'array',
|
|
203
|
-
},
|
|
204
|
-
],
|
|
205
|
-
items: {
|
|
206
|
-
type: 'string',
|
|
207
|
-
},
|
|
208
|
-
description:
|
|
209
|
-
'True or false to return the _source field or not, or a list of fields to return.',
|
|
210
|
-
},
|
|
211
|
-
_source_excludes: {
|
|
212
|
-
type: 'array',
|
|
213
|
-
items: {
|
|
214
|
-
type: 'string',
|
|
215
|
-
},
|
|
216
|
-
description:
|
|
217
|
-
'A comma-separated list of source fields to exclude from the response.\n\nYou can also use this parameter to exclude fields from the subset specified in _source_includes query parameter.\n\nIf the _source parameter is false, this parameter is ignored.',
|
|
218
|
-
},
|
|
219
|
-
_source_includes: {
|
|
220
|
-
type: 'array',
|
|
221
|
-
items: {
|
|
222
|
-
type: 'string',
|
|
223
|
-
},
|
|
224
|
-
description:
|
|
225
|
-
'A comma-separated list of source fields to include in the response.\n\nIf this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the _source_excludes query parameter.\n\nIf the _source parameter is false, this parameter is ignored.',
|
|
226
|
-
},
|
|
227
|
-
stats: {
|
|
228
|
-
description: 'Specific tag of the request for logging and statistical purposes',
|
|
229
|
-
anyOf: [
|
|
230
|
-
{
|
|
231
|
-
items: {
|
|
232
|
-
type: 'string',
|
|
233
|
-
},
|
|
234
|
-
type: 'array',
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
type: 'string',
|
|
238
|
-
},
|
|
239
|
-
],
|
|
240
|
-
},
|
|
241
|
-
terminate_after: {
|
|
242
|
-
description:
|
|
243
|
-
'The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. Elasticsearch collects documents before sorting.\nUse with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.',
|
|
244
|
-
type: 'number',
|
|
245
|
-
},
|
|
246
|
-
timeout: {
|
|
247
|
-
type: 'string',
|
|
248
|
-
description:
|
|
249
|
-
'Period each deletion request waits for active shards. Defaults to 1m (one minute).',
|
|
250
|
-
default: '1m',
|
|
251
|
-
},
|
|
252
|
-
version: {
|
|
253
|
-
description:
|
|
254
|
-
'Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.',
|
|
255
|
-
type: 'integer',
|
|
256
|
-
},
|
|
257
|
-
wait_for_active_shards: {
|
|
258
|
-
type: 'string',
|
|
259
|
-
description:
|
|
260
|
-
'The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). Default: 1, the primary shard.',
|
|
261
|
-
default: '1',
|
|
262
|
-
},
|
|
263
|
-
wait_for_completion: {
|
|
264
|
-
type: 'boolean',
|
|
265
|
-
description:
|
|
266
|
-
'Should the request should block until the update by query operation is complete. Default: true',
|
|
267
|
-
default: true,
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
errorMessage: {
|
|
271
|
-
type: 'ElasticsearchDelete request properties should be an object.',
|
|
272
|
-
},
|
|
273
|
-
};
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
</SCHEMA>
|
|
277
|
-
|
|
278
|
-
<EXAMPLES>
|
|
279
|
-
|
|
280
|
-
### Update all red cars
|
|
281
|
-
|
|
282
|
-
```yaml
|
|
283
|
-
requests:
|
|
284
|
-
- id: update_red_cars
|
|
285
|
-
type: ElasticsearchUpdateByQuery
|
|
286
|
-
properties:
|
|
287
|
-
body:
|
|
288
|
-
query:
|
|
289
|
-
term:
|
|
290
|
-
color:
|
|
291
|
-
value: red
|
|
292
|
-
script:
|
|
293
|
-
source: 'ctx._source.out_of_stock=true'
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
</EXAMPLES>
|