@lowdefy/connection-elasticsearch 4.0.0-alpha.6 → 4.0.0-alpha.7

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.
Files changed (29) hide show
  1. package/dist/connections/Elasticsearch/Elasticsearch.js +2 -3
  2. package/dist/connections/Elasticsearch/ElasticsearchDelete/ElasticsearchDelete.js +8 -2
  3. package/dist/connections/Elasticsearch/ElasticsearchDelete/schema.js +101 -0
  4. package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.js +8 -2
  5. package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/schema.js +245 -0
  6. package/dist/connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.js +8 -2
  7. package/dist/connections/Elasticsearch/ElasticsearchIndex/schema.js +114 -0
  8. package/dist/connections/Elasticsearch/ElasticsearchSearch/ElasticsearchSearch.js +8 -3
  9. package/dist/connections/Elasticsearch/ElasticsearchSearch/schema.js +452 -0
  10. package/dist/connections/Elasticsearch/ElasticsearchUpdate/ElasticsearchUpdate.js +8 -2
  11. package/dist/connections/Elasticsearch/ElasticsearchUpdate/schema.js +201 -0
  12. package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.js +8 -2
  13. package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/schema.js +254 -0
  14. package/dist/connections/Elasticsearch/schema.js +471 -0
  15. package/dist/{connections/Elasticsearch/ElasticsearchIndex/index.js → connections.js} +1 -10
  16. package/dist/{connections/Elasticsearch/ElasticsearchDelete/index.js → types.js} +6 -10
  17. package/package.json +11 -10
  18. package/dist/connections/Elasticsearch/ElasticsearchDelete/ElasticsearchDelete.json +0 -87
  19. package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.json +0 -231
  20. package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/index.js +0 -24
  21. package/dist/connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.json +0 -100
  22. package/dist/connections/Elasticsearch/ElasticsearchSchema.json +0 -457
  23. package/dist/connections/Elasticsearch/ElasticsearchSearch/ElasticsearchSearch.json +0 -380
  24. package/dist/connections/Elasticsearch/ElasticsearchSearch/index.js +0 -24
  25. package/dist/connections/Elasticsearch/ElasticsearchUpdate/ElasticsearchUpdate.json +0 -187
  26. package/dist/connections/Elasticsearch/ElasticsearchUpdate/index.js +0 -24
  27. package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.json +0 -240
  28. package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/index.js +0 -24
  29. package/dist/index.js +0 -7
@@ -0,0 +1,254 @@
1
+ /*
2
+ Copyright 2020-2021 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ $schema: 'http://json-schema.org/draft-07/schema#',
17
+ title: 'Lowdefy Request Schema - ElasticsearchUpdateByQuery',
18
+ type: 'object',
19
+ description: '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.',
20
+ properties: {
21
+ index: {
22
+ type: 'string',
23
+ description: 'The name of the index.'
24
+ },
25
+ allow_no_indices: {
26
+ type: 'boolean',
27
+ description: '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.',
28
+ default: true
29
+ },
30
+ analyzer: {
31
+ description: 'The analyzer to use for the query string.',
32
+ type: 'string'
33
+ },
34
+ analyze_wildcard: {
35
+ description: 'Specify whether wildcard and prefix queries should be analyzed.',
36
+ type: 'boolean',
37
+ default: false
38
+ },
39
+ conflicts: {
40
+ type: 'string',
41
+ enum: [
42
+ 'abort',
43
+ 'proceed'
44
+ ],
45
+ description: 'What to do if update by query hits version conflicts: abort or proceed. Defaults to abort.',
46
+ default: 'abort'
47
+ },
48
+ default_operator: {
49
+ description: 'The default operator for query string query (AND or OR).',
50
+ enum: [
51
+ 'AND',
52
+ 'OR'
53
+ ],
54
+ type: 'string',
55
+ default: 'OR'
56
+ },
57
+ df: {
58
+ description: 'The field to use as default where no field prefix is given in the query string.',
59
+ type: 'string'
60
+ },
61
+ expand_wildcards: {
62
+ description: 'Whether to expand wildcard expression to concrete indices that are open, closed or both.',
63
+ enum: [
64
+ 'all',
65
+ 'closed',
66
+ 'hidden',
67
+ 'none',
68
+ 'open'
69
+ ],
70
+ type: 'string',
71
+ default: 'open'
72
+ },
73
+ from: {
74
+ description: 'Starting offset.',
75
+ type: 'number',
76
+ default: 0
77
+ },
78
+ ignore_unavailable: {
79
+ description: 'Whether specified concrete indices should be ignored when unavailable (missing or closed)',
80
+ type: 'boolean'
81
+ },
82
+ lenient: {
83
+ description: 'Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.',
84
+ type: 'boolean'
85
+ },
86
+ max_docs: {
87
+ type: 'integer',
88
+ description: 'Maximum number of documents to process. Defaults to all documents.'
89
+ },
90
+ pipeline: {
91
+ type: 'string',
92
+ description: 'ID of the pipeline to use to preprocess incoming documents.'
93
+ },
94
+ preference: {
95
+ description: 'Specify the node or shard the operation should be performed on.',
96
+ type: 'string',
97
+ default: 'random'
98
+ },
99
+ pretty: {
100
+ description: 'Pretty format the returned JSON response.',
101
+ type: 'boolean'
102
+ },
103
+ q: {
104
+ description: 'Query in the Lucene query string syntax.',
105
+ type: 'string'
106
+ },
107
+ request_cache: {
108
+ description: 'Specify if request cache should be used for this request or not, defaults to index level setting.',
109
+ type: 'boolean'
110
+ },
111
+ refresh: {
112
+ anyOf: [
113
+ {
114
+ type: 'string'
115
+ },
116
+ {
117
+ type: 'boolean'
118
+ },
119
+ ],
120
+ description: 'If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. Defaults to false.',
121
+ enum: [
122
+ 'true',
123
+ 'false',
124
+ true,
125
+ false,
126
+ 'wait_for'
127
+ ],
128
+ default: false
129
+ },
130
+ requests_per_second: {
131
+ type: 'integer',
132
+ description: 'The throttle for this request in sub-requests per second. Defaults to -1 (no throttle).',
133
+ default: -1
134
+ },
135
+ routing: {
136
+ type: 'string',
137
+ description: 'Custom value used to route operations to a specific shard.'
138
+ },
139
+ scroll: {
140
+ type: 'string',
141
+ description: 'Period to retain the search context for scrolling. See Scroll search results.'
142
+ },
143
+ scroll_size: {
144
+ type: 'integer',
145
+ description: 'Size on the scroll request powering the update by query. Defaults to 100.',
146
+ default: 100
147
+ },
148
+ search_type: {
149
+ description: 'Search operation type.',
150
+ enum: [
151
+ 'dfs_query_then_fetch',
152
+ 'query_then_fetch'
153
+ ],
154
+ type: 'string'
155
+ },
156
+ search_timeout: {
157
+ type: 'string',
158
+ description: 'Explicit timeout for each search request. Defaults to no timeout.'
159
+ },
160
+ slices: {
161
+ type: 'integer',
162
+ description: "The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
163
+ },
164
+ sort: {
165
+ description: 'A comma-separated list of <field>:<direction> pairs.',
166
+ examples: [
167
+ 'name:asc',
168
+ [
169
+ 'rating:asc',
170
+ 'created_at:desc'
171
+ ]
172
+ ],
173
+ anyOf: [
174
+ {
175
+ items: {
176
+ type: 'string'
177
+ },
178
+ type: 'array'
179
+ },
180
+ {
181
+ type: 'string'
182
+ },
183
+ ]
184
+ },
185
+ _source: {
186
+ anyOf: [
187
+ {
188
+ type: 'boolean'
189
+ },
190
+ {
191
+ type: 'array'
192
+ },
193
+ ],
194
+ items: {
195
+ type: 'string'
196
+ },
197
+ description: 'True or false to return the _source field or not, or a list of fields to return.'
198
+ },
199
+ _source_excludes: {
200
+ type: 'array',
201
+ items: {
202
+ type: 'string'
203
+ },
204
+ description: '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.'
205
+ },
206
+ _source_includes: {
207
+ type: 'array',
208
+ items: {
209
+ type: 'string'
210
+ },
211
+ description: '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.'
212
+ },
213
+ stats: {
214
+ description: 'Specific tag of the request for logging and statistical purposes',
215
+ anyOf: [
216
+ {
217
+ items: {
218
+ type: 'string'
219
+ },
220
+ type: 'array'
221
+ },
222
+ {
223
+ type: 'string'
224
+ },
225
+ ]
226
+ },
227
+ terminate_after: {
228
+ description: '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.',
229
+ type: 'number'
230
+ },
231
+ timeout: {
232
+ type: 'string',
233
+ description: 'Period each deletion request waits for active shards. Defaults to 1m (one minute).',
234
+ default: '1m'
235
+ },
236
+ version: {
237
+ description: 'Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.',
238
+ type: 'integer'
239
+ },
240
+ wait_for_active_shards: {
241
+ type: 'string',
242
+ description: '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.',
243
+ default: '1'
244
+ },
245
+ wait_for_completion: {
246
+ type: 'boolean',
247
+ description: 'Should the request should block until the update by query operation is complete. Default: true',
248
+ default: true
249
+ }
250
+ },
251
+ errorMessage: {
252
+ type: 'ElasticsearchDelete request properties should be an object.'
253
+ }
254
+ };