@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,502 +0,0 @@
|
|
|
1
|
-
<TITLE>
|
|
2
|
-
ElasticsearchSearch
|
|
3
|
-
</TITLE>
|
|
4
|
-
|
|
5
|
-
<DESCRIPTION>
|
|
6
|
-
|
|
7
|
-
The `ElasticsearchSearch` request searches the Elasticsearch index.
|
|
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
|
-
- `aggs: object`: The [aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html) to request from the server.
|
|
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
|
-
- `allow_partial_search_results: boolean`: Indicate if an error should be returned if there is a partial search failure or timeout.
|
|
19
|
-
- `analyzer: string`: The analyzer to use for the query string
|
|
20
|
-
- `default_operator: string`: The default operator for query string query (AND or OR).
|
|
21
|
-
- `df: string`: The field to use as default where no field prefix is given in the query string.
|
|
22
|
-
- `from: number`: Starting offset.
|
|
23
|
-
- `size: number`: Number of hits to return.
|
|
24
|
-
- `index: string|string[]`: A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices.
|
|
25
|
-
- `lenient: boolean`: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.
|
|
26
|
-
- `scroll: string`: Specify how long a consistent view of the index should be maintained for scrolled search.
|
|
27
|
-
- `sort: string|string[]`: A comma-separated list of <field>:<direction> pairs.
|
|
28
|
-
|
|
29
|
-
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/client/javascript-api/current/api-reference.html#_search) provided by Elastic.
|
|
30
|
-
|
|
31
|
-
</DESCRIPTION>
|
|
32
|
-
|
|
33
|
-
<CONNECTION>
|
|
34
|
-
Elasticsearch
|
|
35
|
-
</CONNECTION>
|
|
36
|
-
|
|
37
|
-
<SCHEMA>
|
|
38
|
-
|
|
39
|
-
```js
|
|
40
|
-
export default {
|
|
41
|
-
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
42
|
-
title: 'Lowdefy Request Schema - ElasticsearchSearch',
|
|
43
|
-
type: 'object',
|
|
44
|
-
properties: {
|
|
45
|
-
body: {
|
|
46
|
-
type: 'object',
|
|
47
|
-
description: 'The search definition using the Query DSL.',
|
|
48
|
-
properties: {
|
|
49
|
-
query: {
|
|
50
|
-
$ref: '#/definitions/Query',
|
|
51
|
-
},
|
|
52
|
-
aggs: {
|
|
53
|
-
description: 'The aggregations to request for the search.',
|
|
54
|
-
type: 'object',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
_source: {
|
|
59
|
-
description:
|
|
60
|
-
'True or false to return the _source field or not, or a list of fields to return.',
|
|
61
|
-
examples: [['id', 'name'], 'name', true, false],
|
|
62
|
-
anyOf: [
|
|
63
|
-
{
|
|
64
|
-
items: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
},
|
|
67
|
-
type: 'array',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
type: 'string',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
type: 'boolean',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
_source_exclude: {
|
|
78
|
-
description: 'A list of fields to exclude from the returned _source field.',
|
|
79
|
-
examples: [['id', 'name'], 'name'],
|
|
80
|
-
anyOf: [
|
|
81
|
-
{
|
|
82
|
-
items: {
|
|
83
|
-
type: 'string',
|
|
84
|
-
},
|
|
85
|
-
type: 'array',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: 'string',
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
_source_excludes: {
|
|
93
|
-
description: 'A list of fields to exclude from the returned _source field.',
|
|
94
|
-
examples: [['id', 'name'], 'name'],
|
|
95
|
-
anyOf: [
|
|
96
|
-
{
|
|
97
|
-
items: {
|
|
98
|
-
type: 'string',
|
|
99
|
-
},
|
|
100
|
-
type: 'array',
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
type: 'string',
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
},
|
|
107
|
-
_source_include: {
|
|
108
|
-
description: 'A list of fields to extract and return from the _source field.',
|
|
109
|
-
examples: [['id', 'name'], 'name'],
|
|
110
|
-
anyOf: [
|
|
111
|
-
{
|
|
112
|
-
items: {
|
|
113
|
-
type: 'string',
|
|
114
|
-
},
|
|
115
|
-
type: 'array',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: 'string',
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
},
|
|
122
|
-
_source_includes: {
|
|
123
|
-
description: 'A list of fields to extract and return from the _source field.',
|
|
124
|
-
examples: [['id', 'name'], 'name'],
|
|
125
|
-
anyOf: [
|
|
126
|
-
{
|
|
127
|
-
items: {
|
|
128
|
-
type: 'string',
|
|
129
|
-
},
|
|
130
|
-
type: 'array',
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
type: 'string',
|
|
134
|
-
},
|
|
135
|
-
],
|
|
136
|
-
},
|
|
137
|
-
allow_no_indices: {
|
|
138
|
-
description:
|
|
139
|
-
'Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified).',
|
|
140
|
-
type: 'boolean',
|
|
141
|
-
},
|
|
142
|
-
allow_partial_search_results: {
|
|
143
|
-
description:
|
|
144
|
-
'Indicate if an error should be returned if there is a partial search failure or timeout.',
|
|
145
|
-
type: 'boolean',
|
|
146
|
-
default: true,
|
|
147
|
-
},
|
|
148
|
-
analyze_wildcard: {
|
|
149
|
-
description: 'Specify whether wildcard and prefix queries should be analyzed.',
|
|
150
|
-
type: 'boolean',
|
|
151
|
-
default: false,
|
|
152
|
-
},
|
|
153
|
-
analyzer: {
|
|
154
|
-
description: 'The analyzer to use for the query string.',
|
|
155
|
-
type: 'string',
|
|
156
|
-
},
|
|
157
|
-
batched_reduce_size: {
|
|
158
|
-
description:
|
|
159
|
-
'The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.',
|
|
160
|
-
type: 'number',
|
|
161
|
-
default: 512,
|
|
162
|
-
},
|
|
163
|
-
ccs_minimize_roundtrips: {
|
|
164
|
-
description:
|
|
165
|
-
'Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution.',
|
|
166
|
-
type: 'boolean',
|
|
167
|
-
default: true,
|
|
168
|
-
},
|
|
169
|
-
default_operator: {
|
|
170
|
-
description: 'The default operator for query string query (AND or OR).',
|
|
171
|
-
enum: ['AND', 'OR'],
|
|
172
|
-
type: 'string',
|
|
173
|
-
default: 'OR',
|
|
174
|
-
},
|
|
175
|
-
df: {
|
|
176
|
-
description:
|
|
177
|
-
'The field to use as default where no field prefix is given in the query string.',
|
|
178
|
-
type: 'string',
|
|
179
|
-
},
|
|
180
|
-
docvalue_fields: {
|
|
181
|
-
description:
|
|
182
|
-
'A comma-separated list of fields to return as the docvalue representation of a field for each hit.',
|
|
183
|
-
anyOf: [
|
|
184
|
-
{
|
|
185
|
-
items: {
|
|
186
|
-
type: 'string',
|
|
187
|
-
},
|
|
188
|
-
type: 'array',
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
type: 'string',
|
|
192
|
-
},
|
|
193
|
-
],
|
|
194
|
-
},
|
|
195
|
-
error_trace: {
|
|
196
|
-
description: 'Include the stack trace of returned errors.',
|
|
197
|
-
type: 'boolean',
|
|
198
|
-
},
|
|
199
|
-
expand_wildcards: {
|
|
200
|
-
description:
|
|
201
|
-
'Whether to expand wildcard expression to concrete indices that are open, closed or both.',
|
|
202
|
-
enum: ['all', 'closed', 'hidden', 'none', 'open'],
|
|
203
|
-
type: 'string',
|
|
204
|
-
default: 'open',
|
|
205
|
-
},
|
|
206
|
-
explain: {
|
|
207
|
-
description:
|
|
208
|
-
'Specify whether to return detailed information about score computation as part of a hit.',
|
|
209
|
-
type: 'boolean',
|
|
210
|
-
},
|
|
211
|
-
from: {
|
|
212
|
-
description: 'Starting offset.',
|
|
213
|
-
type: 'number',
|
|
214
|
-
default: 0,
|
|
215
|
-
},
|
|
216
|
-
human: {
|
|
217
|
-
description: 'Return human readable values for statistics.',
|
|
218
|
-
type: 'boolean',
|
|
219
|
-
default: true,
|
|
220
|
-
},
|
|
221
|
-
ignore_throttled: {
|
|
222
|
-
description:
|
|
223
|
-
'Whether specified concrete, expanded or aliased indices should be ignored when throttled.',
|
|
224
|
-
type: 'boolean',
|
|
225
|
-
},
|
|
226
|
-
ignore_unavailable: {
|
|
227
|
-
description:
|
|
228
|
-
'Whether specified concrete indices should be ignored when unavailable (missing or closed)',
|
|
229
|
-
type: 'boolean',
|
|
230
|
-
},
|
|
231
|
-
index: {
|
|
232
|
-
description:
|
|
233
|
-
'A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices.',
|
|
234
|
-
anyOf: [
|
|
235
|
-
{
|
|
236
|
-
items: {
|
|
237
|
-
type: 'string',
|
|
238
|
-
},
|
|
239
|
-
type: 'array',
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
type: 'string',
|
|
243
|
-
},
|
|
244
|
-
],
|
|
245
|
-
examples: ['', '_all', 'my_index'],
|
|
246
|
-
},
|
|
247
|
-
lenient: {
|
|
248
|
-
description:
|
|
249
|
-
'Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.',
|
|
250
|
-
type: 'boolean',
|
|
251
|
-
},
|
|
252
|
-
max_concurrent_shard_requests: {
|
|
253
|
-
description:
|
|
254
|
-
'The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.',
|
|
255
|
-
type: 'number',
|
|
256
|
-
default: 5,
|
|
257
|
-
},
|
|
258
|
-
min_compatible_shard_node: {
|
|
259
|
-
description:
|
|
260
|
-
'The minimum compatible version that all shards involved in search should have for this request to be successful.',
|
|
261
|
-
type: 'string',
|
|
262
|
-
},
|
|
263
|
-
pre_filter_shard_size: {
|
|
264
|
-
description:
|
|
265
|
-
'A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.',
|
|
266
|
-
type: 'number',
|
|
267
|
-
},
|
|
268
|
-
preference: {
|
|
269
|
-
description: 'Specify the node or shard the operation should be performed on.',
|
|
270
|
-
type: 'string',
|
|
271
|
-
default: 'random',
|
|
272
|
-
},
|
|
273
|
-
pretty: {
|
|
274
|
-
description: 'Pretty format the returned JSON response.',
|
|
275
|
-
type: 'boolean',
|
|
276
|
-
},
|
|
277
|
-
q: {
|
|
278
|
-
description: 'Query in the Lucene query string syntax.',
|
|
279
|
-
type: 'string',
|
|
280
|
-
},
|
|
281
|
-
request_cache: {
|
|
282
|
-
description:
|
|
283
|
-
'Specify if request cache should be used for this request or not, defaults to index level setting.',
|
|
284
|
-
type: 'boolean',
|
|
285
|
-
},
|
|
286
|
-
rest_total_hits_as_int: {
|
|
287
|
-
description:
|
|
288
|
-
'Indicates whether hits.total should be rendered as an integer or an object in the rest search response.',
|
|
289
|
-
type: 'boolean',
|
|
290
|
-
},
|
|
291
|
-
routing: {
|
|
292
|
-
description: 'A comma-separated list of specific routing values.',
|
|
293
|
-
anyOf: [
|
|
294
|
-
{
|
|
295
|
-
items: {
|
|
296
|
-
type: 'string',
|
|
297
|
-
},
|
|
298
|
-
type: 'array',
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
type: 'string',
|
|
302
|
-
},
|
|
303
|
-
],
|
|
304
|
-
},
|
|
305
|
-
scroll: {
|
|
306
|
-
description:
|
|
307
|
-
'Specify how long a consistent view of the index should be maintained for scrolled search.',
|
|
308
|
-
type: 'string',
|
|
309
|
-
},
|
|
310
|
-
search_type: {
|
|
311
|
-
description: 'Search operation type.',
|
|
312
|
-
enum: ['dfs_query_then_fetch', 'query_then_fetch'],
|
|
313
|
-
type: 'string',
|
|
314
|
-
},
|
|
315
|
-
seq_no_primary_term: {
|
|
316
|
-
description:
|
|
317
|
-
'Specify whether to return sequence number and primary term of the last modification of each hit',
|
|
318
|
-
type: 'boolean',
|
|
319
|
-
},
|
|
320
|
-
size: {
|
|
321
|
-
description: 'Number of hits to return.',
|
|
322
|
-
type: 'number',
|
|
323
|
-
default: 10,
|
|
324
|
-
},
|
|
325
|
-
sort: {
|
|
326
|
-
description: 'A comma-separated list of <field>:<direction> pairs.',
|
|
327
|
-
examples: ['name:asc', ['rating:asc', 'created_at:desc']],
|
|
328
|
-
anyOf: [
|
|
329
|
-
{
|
|
330
|
-
items: {
|
|
331
|
-
type: 'string',
|
|
332
|
-
},
|
|
333
|
-
type: 'array',
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
type: 'string',
|
|
337
|
-
},
|
|
338
|
-
],
|
|
339
|
-
},
|
|
340
|
-
source: {
|
|
341
|
-
description:
|
|
342
|
-
'The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.',
|
|
343
|
-
type: 'string',
|
|
344
|
-
},
|
|
345
|
-
stats: {
|
|
346
|
-
description: 'Specific tag of the request for logging and statistical purposes',
|
|
347
|
-
anyOf: [
|
|
348
|
-
{
|
|
349
|
-
items: {
|
|
350
|
-
type: 'string',
|
|
351
|
-
},
|
|
352
|
-
type: 'array',
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
type: 'string',
|
|
356
|
-
},
|
|
357
|
-
],
|
|
358
|
-
},
|
|
359
|
-
stored_fields: {
|
|
360
|
-
description: 'A comma-separated list of stored fields to return as part of a hit',
|
|
361
|
-
anyOf: [
|
|
362
|
-
{
|
|
363
|
-
items: {
|
|
364
|
-
type: 'string',
|
|
365
|
-
},
|
|
366
|
-
type: 'array',
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
type: 'string',
|
|
370
|
-
},
|
|
371
|
-
],
|
|
372
|
-
},
|
|
373
|
-
suggest_field: {
|
|
374
|
-
description: 'Specify which field to use for suggestions',
|
|
375
|
-
type: 'string',
|
|
376
|
-
},
|
|
377
|
-
suggest_mode: {
|
|
378
|
-
description: 'Specify suggest mode',
|
|
379
|
-
enum: ['always', 'missing', 'popular'],
|
|
380
|
-
type: 'string',
|
|
381
|
-
default: 'missing',
|
|
382
|
-
},
|
|
383
|
-
suggest_size: {
|
|
384
|
-
description: 'How many suggestions to return in response',
|
|
385
|
-
type: 'number',
|
|
386
|
-
},
|
|
387
|
-
suggest_text: {
|
|
388
|
-
description: 'The source text for which the suggestions should be returned.',
|
|
389
|
-
type: 'string',
|
|
390
|
-
},
|
|
391
|
-
terminate_after: {
|
|
392
|
-
description:
|
|
393
|
-
'The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.',
|
|
394
|
-
type: 'number',
|
|
395
|
-
},
|
|
396
|
-
timeout: {
|
|
397
|
-
description: 'Explicit operation timeout.',
|
|
398
|
-
type: 'string',
|
|
399
|
-
},
|
|
400
|
-
track_scores: {
|
|
401
|
-
description: 'Whether to calculate and return scores even if they are not used for sorting.',
|
|
402
|
-
type: 'boolean',
|
|
403
|
-
},
|
|
404
|
-
track_total_hits: {
|
|
405
|
-
description: 'Indicate if the number of documents that match the query should be tracked.',
|
|
406
|
-
type: 'boolean',
|
|
407
|
-
},
|
|
408
|
-
type: {
|
|
409
|
-
description:
|
|
410
|
-
'A comma-separated list of document types to search; leave empty to perform the operation on all types.',
|
|
411
|
-
anyOf: [
|
|
412
|
-
{
|
|
413
|
-
items: {
|
|
414
|
-
type: 'string',
|
|
415
|
-
},
|
|
416
|
-
type: 'array',
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
type: 'string',
|
|
420
|
-
},
|
|
421
|
-
],
|
|
422
|
-
},
|
|
423
|
-
typed_keys: {
|
|
424
|
-
description:
|
|
425
|
-
'Specify whether aggregation and suggester names should be prefixed by their respective types in the response.',
|
|
426
|
-
type: 'boolean',
|
|
427
|
-
},
|
|
428
|
-
version: {
|
|
429
|
-
description: 'Specify whether to return document version as part of a hit',
|
|
430
|
-
type: 'boolean',
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
|
-
definitions: {
|
|
434
|
-
Query: {
|
|
435
|
-
description:
|
|
436
|
-
'A query expressed in the Elasticsearch query DSL. See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html.',
|
|
437
|
-
type: 'object',
|
|
438
|
-
additionalProperties: true,
|
|
439
|
-
},
|
|
440
|
-
},
|
|
441
|
-
errorMessage: {
|
|
442
|
-
type: 'ElasticsearchSearch request properties should be an object.',
|
|
443
|
-
},
|
|
444
|
-
};
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
</SCHEMA>
|
|
448
|
-
|
|
449
|
-
<EXAMPLES>
|
|
450
|
-
|
|
451
|
-
### Fetch the first 10 matching documents
|
|
452
|
-
|
|
453
|
-
```yaml
|
|
454
|
-
requests:
|
|
455
|
-
- id: fetch_docs
|
|
456
|
-
type: Elasticsearch
|
|
457
|
-
connectionId: elasticsearch
|
|
458
|
-
properties:
|
|
459
|
-
size: 10
|
|
460
|
-
body:
|
|
461
|
-
query:
|
|
462
|
-
match_all: {}
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
### Find a document with ID 42
|
|
466
|
-
|
|
467
|
-
```yaml
|
|
468
|
-
requests:
|
|
469
|
-
- id: fetch_docs
|
|
470
|
-
type: Elasticsearch
|
|
471
|
-
connectionId: elasticsearch
|
|
472
|
-
properties:
|
|
473
|
-
size: 1
|
|
474
|
-
body:
|
|
475
|
-
query:
|
|
476
|
-
term:
|
|
477
|
-
_id: 42
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
### Fetch articles between yesterday and today, aggregate by author
|
|
481
|
-
|
|
482
|
-
```yaml
|
|
483
|
-
requests:
|
|
484
|
-
- id: fetch_docs
|
|
485
|
-
type: Elasticsearch
|
|
486
|
-
connectionId: elasticsearch
|
|
487
|
-
properties:
|
|
488
|
-
size: 1
|
|
489
|
-
type: article
|
|
490
|
-
body:
|
|
491
|
-
query:
|
|
492
|
-
range:
|
|
493
|
-
timestamp:
|
|
494
|
-
gte: now-1d/d
|
|
495
|
-
lt: now/d
|
|
496
|
-
aggs:
|
|
497
|
-
author_aggregation:
|
|
498
|
-
terms:
|
|
499
|
-
field: author
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
</EXAMPLES>
|