@lowdefy/connection-elasticsearch 4.0.0-alpha.5 → 4.0.0-alpha.8
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 +2 -3
- package/dist/connections/Elasticsearch/ElasticsearchDelete/ElasticsearchDelete.js +8 -2
- package/dist/connections/Elasticsearch/ElasticsearchDelete/schema.js +101 -0
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.js +8 -2
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/schema.js +245 -0
- package/dist/connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.js +8 -2
- package/dist/connections/Elasticsearch/ElasticsearchIndex/schema.js +114 -0
- package/dist/connections/Elasticsearch/ElasticsearchSearch/ElasticsearchSearch.js +10 -7
- package/dist/connections/Elasticsearch/ElasticsearchSearch/schema.js +452 -0
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/ElasticsearchUpdate.js +8 -2
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/schema.js +201 -0
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.js +8 -2
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/schema.js +254 -0
- package/dist/connections/Elasticsearch/schema.js +471 -0
- package/dist/{connections/Elasticsearch/ElasticsearchIndex/index.js → connections.js} +1 -10
- package/dist/{connections/Elasticsearch/ElasticsearchDelete/index.js → types.js} +6 -10
- package/package.json +13 -12
- package/dist/connections/Elasticsearch/ElasticsearchDelete/ElasticsearchDelete.json +0 -87
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.json +0 -231
- package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/index.js +0 -24
- package/dist/connections/Elasticsearch/ElasticsearchIndex/ElasticsearchIndex.json +0 -100
- package/dist/connections/Elasticsearch/ElasticsearchSchema.json +0 -457
- package/dist/connections/Elasticsearch/ElasticsearchSearch/ElasticsearchSearch.json +0 -380
- package/dist/connections/Elasticsearch/ElasticsearchSearch/index.js +0 -24
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/ElasticsearchUpdate.json +0 -187
- package/dist/connections/Elasticsearch/ElasticsearchUpdate/index.js +0 -24
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/ElasticsearchUpdateByQuery.json +0 -240
- package/dist/connections/Elasticsearch/ElasticsearchUpdateByQuery/index.js +0 -24
- package/dist/index.js +0 -7
package/dist/connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.json
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - ElasticsearchDeleteByQuery",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"description": "Deletes documents that match the specified query.",
|
|
6
|
-
"properties": {
|
|
7
|
-
"index": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The name of the index."
|
|
10
|
-
},
|
|
11
|
-
"allow_no_indices": {
|
|
12
|
-
"type": "boolean",
|
|
13
|
-
"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.",
|
|
14
|
-
"default": true
|
|
15
|
-
},
|
|
16
|
-
"analyzer": {
|
|
17
|
-
"description": "The analyzer to use for the query string.",
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
"analyze_wildcard": {
|
|
21
|
-
"description": "Specify whether wildcard and prefix queries should be analyzed.",
|
|
22
|
-
"type": "boolean",
|
|
23
|
-
"default": false
|
|
24
|
-
},
|
|
25
|
-
"conflicts": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"enum": [
|
|
28
|
-
"abort",
|
|
29
|
-
"proceed"
|
|
30
|
-
],
|
|
31
|
-
"description": "What to do if delete by query hits version conflicts: abort or proceed. Defaults to abort.",
|
|
32
|
-
"default": "abort"
|
|
33
|
-
},
|
|
34
|
-
"default_operator": {
|
|
35
|
-
"description": "The default operator for query string query (AND or OR).",
|
|
36
|
-
"enum": [
|
|
37
|
-
"AND",
|
|
38
|
-
"OR"
|
|
39
|
-
],
|
|
40
|
-
"type": "string",
|
|
41
|
-
"default": "OR"
|
|
42
|
-
},
|
|
43
|
-
"df": {
|
|
44
|
-
"description": "The field to use as default where no field prefix is given in the query string.",
|
|
45
|
-
"type": "string"
|
|
46
|
-
},
|
|
47
|
-
"expand_wildcards": {
|
|
48
|
-
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.",
|
|
49
|
-
"enum": [
|
|
50
|
-
"all",
|
|
51
|
-
"closed",
|
|
52
|
-
"hidden",
|
|
53
|
-
"none",
|
|
54
|
-
"open"
|
|
55
|
-
],
|
|
56
|
-
"type": "string",
|
|
57
|
-
"default": "open"
|
|
58
|
-
},
|
|
59
|
-
"from": {
|
|
60
|
-
"description": "Starting offset.",
|
|
61
|
-
"type": "number",
|
|
62
|
-
"default": 0
|
|
63
|
-
},
|
|
64
|
-
"ignore_unavailable": {
|
|
65
|
-
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)",
|
|
66
|
-
"type": "boolean"
|
|
67
|
-
},
|
|
68
|
-
"lenient": {
|
|
69
|
-
"description": "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.",
|
|
70
|
-
"type": "boolean"
|
|
71
|
-
},
|
|
72
|
-
"max_docs": {
|
|
73
|
-
"type": "integer",
|
|
74
|
-
"description": "Maximum number of documents to process. Defaults to all documents."
|
|
75
|
-
},
|
|
76
|
-
"preference": {
|
|
77
|
-
"description": "Specify the node or shard the operation should be performed on.",
|
|
78
|
-
"type": "string",
|
|
79
|
-
"default": "random"
|
|
80
|
-
},
|
|
81
|
-
"pretty": {
|
|
82
|
-
"description": "Pretty format the returned JSON response.",
|
|
83
|
-
"type": "boolean"
|
|
84
|
-
},
|
|
85
|
-
"q": {
|
|
86
|
-
"description": "Query in the Lucene query string syntax.",
|
|
87
|
-
"type": "string"
|
|
88
|
-
},
|
|
89
|
-
"request_cache": {
|
|
90
|
-
"description": "Specify if request cache should be used for this request or not, defaults to index level setting.",
|
|
91
|
-
"type": "boolean"
|
|
92
|
-
},
|
|
93
|
-
"refresh": {
|
|
94
|
-
"anyOf": [
|
|
95
|
-
{
|
|
96
|
-
"type": "string"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"type": "boolean"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"description": "If true, Elasticsearch refreshes all shards involved in the delete by query after the request completes. Defaults to false.",
|
|
103
|
-
"enum": [
|
|
104
|
-
"true",
|
|
105
|
-
"false",
|
|
106
|
-
true,
|
|
107
|
-
false,
|
|
108
|
-
"wait_for"
|
|
109
|
-
],
|
|
110
|
-
"default": false
|
|
111
|
-
},
|
|
112
|
-
"requests_per_second": {
|
|
113
|
-
"type": "integer",
|
|
114
|
-
"description": "The throttle for this request in sub-requests per second. Defaults to -1 (no throttle).",
|
|
115
|
-
"default": -1
|
|
116
|
-
},
|
|
117
|
-
"routing": {
|
|
118
|
-
"type": "string",
|
|
119
|
-
"description": "Custom value used to route operations to a specific shard."
|
|
120
|
-
},
|
|
121
|
-
"scroll": {
|
|
122
|
-
"type": "string",
|
|
123
|
-
"description": "Period to retain the search context for scrolling. See Scroll search results."
|
|
124
|
-
},
|
|
125
|
-
"scroll_size": {
|
|
126
|
-
"type": "integer",
|
|
127
|
-
"description": "Size of the scroll request that powers the operation. Defaults to 1000.",
|
|
128
|
-
"default": 1000
|
|
129
|
-
},
|
|
130
|
-
"search_type": {
|
|
131
|
-
"description": "Search operation type.",
|
|
132
|
-
"enum": [
|
|
133
|
-
"dfs_query_then_fetch",
|
|
134
|
-
"query_then_fetch"
|
|
135
|
-
],
|
|
136
|
-
"type": "string"
|
|
137
|
-
},
|
|
138
|
-
"search_timeout": {
|
|
139
|
-
"type": "string",
|
|
140
|
-
"description": "Explicit timeout for each search request. Defaults to no timeout."
|
|
141
|
-
},
|
|
142
|
-
"slices": {
|
|
143
|
-
"type": "integer",
|
|
144
|
-
"description": "The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
|
|
145
|
-
},
|
|
146
|
-
"sort": {
|
|
147
|
-
"description": "A comma-separated list of <field>:<direction> pairs.",
|
|
148
|
-
"examples": [
|
|
149
|
-
"name:asc",
|
|
150
|
-
[
|
|
151
|
-
"rating:asc",
|
|
152
|
-
"created_at:desc"
|
|
153
|
-
]
|
|
154
|
-
],
|
|
155
|
-
"anyOf": [
|
|
156
|
-
{
|
|
157
|
-
"items": {
|
|
158
|
-
"type": "string"
|
|
159
|
-
},
|
|
160
|
-
"type": "array"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"type": "string"
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
},
|
|
167
|
-
"_source": {
|
|
168
|
-
"anyOf": [
|
|
169
|
-
{
|
|
170
|
-
"type": "boolean"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"type": "array"
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
"items": {
|
|
177
|
-
"type": "string"
|
|
178
|
-
},
|
|
179
|
-
"description": "True or false to return the _source field or not, or a list of fields to return."
|
|
180
|
-
},
|
|
181
|
-
"_source_excludes": {
|
|
182
|
-
"type": "array",
|
|
183
|
-
"items": {
|
|
184
|
-
"type": "string"
|
|
185
|
-
},
|
|
186
|
-
"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."
|
|
187
|
-
},
|
|
188
|
-
"_source_includes": {
|
|
189
|
-
"type": "array",
|
|
190
|
-
"items": {
|
|
191
|
-
"type": "string"
|
|
192
|
-
},
|
|
193
|
-
"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."
|
|
194
|
-
},
|
|
195
|
-
"stats": {
|
|
196
|
-
"description": "Specific tag of the request for logging and statistical purposes",
|
|
197
|
-
"anyOf": [
|
|
198
|
-
{
|
|
199
|
-
"items": {
|
|
200
|
-
"type": "string"
|
|
201
|
-
},
|
|
202
|
-
"type": "array"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"type": "string"
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
},
|
|
209
|
-
"terminate_after": {
|
|
210
|
-
"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.",
|
|
211
|
-
"type": "number"
|
|
212
|
-
},
|
|
213
|
-
"timeout": {
|
|
214
|
-
"type": "string",
|
|
215
|
-
"description": "Period each deletion request waits for active shards. Defaults to 1m (one minute).",
|
|
216
|
-
"default": "1m"
|
|
217
|
-
},
|
|
218
|
-
"version": {
|
|
219
|
-
"description": "Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.",
|
|
220
|
-
"type": "integer"
|
|
221
|
-
},
|
|
222
|
-
"wait_for_active_shards": {
|
|
223
|
-
"type": "string",
|
|
224
|
-
"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.",
|
|
225
|
-
"default": "1"
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
"errorMessage": {
|
|
229
|
-
"type": "ElasticsearchDelete request properties should be an object."
|
|
230
|
-
}
|
|
231
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
import: {
|
|
17
|
-
path: 'connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.js',
|
|
18
|
-
schema: 'connections/Elasticsearch/ElasticsearchDeleteByQuery/ElasticsearchDeleteByQuery.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: false,
|
|
22
|
-
checkWrite: true
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - ElasticsearchIndex",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"description": "Adds a JSON document to the specified data stream or index and makes it searchable. If the target is an index and the document already exists, the request updates the document and increments its version.",
|
|
6
|
-
"required": [
|
|
7
|
-
"body"
|
|
8
|
-
],
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": {
|
|
11
|
-
"anyOf": [
|
|
12
|
-
{
|
|
13
|
-
"type": "string"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "number"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"description": "Unique identifier for the document."
|
|
20
|
-
},
|
|
21
|
-
"index": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "The name of the index."
|
|
24
|
-
},
|
|
25
|
-
"if_seq_no": {
|
|
26
|
-
"type": "integer",
|
|
27
|
-
"description": "Only perform the operation if the document has this sequence number. See Optimistic concurrency control."
|
|
28
|
-
},
|
|
29
|
-
"if_primary_term": {
|
|
30
|
-
"type": "integer",
|
|
31
|
-
"description": "Only perform the operation if the document has this primary term. See Optimistic concurrency control."
|
|
32
|
-
},
|
|
33
|
-
"op_type": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"description": "Set to create to only index the document if it does not already exist (put if absent). If a document with the specified _id already exists, the indexing operation will fail. Same as using the <index>/_create endpoint. Valid values: index, create. If document id is specified, it defaults to index. Otherwise, it defaults to create. If the request targets a data stream, an op_type of create is required. See Add documents to a data stream.",
|
|
36
|
-
"enum": [
|
|
37
|
-
"index",
|
|
38
|
-
"create"
|
|
39
|
-
],
|
|
40
|
-
"default": "create"
|
|
41
|
-
},
|
|
42
|
-
"pipeline": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"description": "ID of the pipeline to use to preprocess incoming documents."
|
|
45
|
-
},
|
|
46
|
-
"refresh": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"description": "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.",
|
|
49
|
-
"enum": [
|
|
50
|
-
"true",
|
|
51
|
-
"false",
|
|
52
|
-
"wait_for"
|
|
53
|
-
],
|
|
54
|
-
"default": false
|
|
55
|
-
},
|
|
56
|
-
"routing": {
|
|
57
|
-
"description": "Custom value used to route operations to a specific shard.",
|
|
58
|
-
"type": "string"
|
|
59
|
-
},
|
|
60
|
-
"timeout": {
|
|
61
|
-
"type": "string",
|
|
62
|
-
"description": "Period the request waits for the following operations:\n\nAutomatic index creation\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.",
|
|
63
|
-
"default": "1m"
|
|
64
|
-
},
|
|
65
|
-
"version": {
|
|
66
|
-
"description": "Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.",
|
|
67
|
-
"type": "integer"
|
|
68
|
-
},
|
|
69
|
-
"version_type": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"description": "Specific version type: external, external_gte.",
|
|
72
|
-
"enum": [
|
|
73
|
-
"internal",
|
|
74
|
-
"external",
|
|
75
|
-
"external_gte"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
"wait_for_active_shard": {
|
|
79
|
-
"type": "string",
|
|
80
|
-
"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.",
|
|
81
|
-
"default": "1"
|
|
82
|
-
},
|
|
83
|
-
"require_alias": {
|
|
84
|
-
"type": "boolean",
|
|
85
|
-
"description": "If true, the destination must be an index alias. Defaults to false.",
|
|
86
|
-
"default": false
|
|
87
|
-
},
|
|
88
|
-
"body": {
|
|
89
|
-
"type": "object",
|
|
90
|
-
"description": "Request body contains the JSON source for the document data.",
|
|
91
|
-
"additionalProperties": true
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"errorMessage": {
|
|
95
|
-
"type": "ElasticsearchIndex request properties should be an object.",
|
|
96
|
-
"required": {
|
|
97
|
-
"body": "ElasticsearchIndex request should have required property \"body\"."
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|