@lowdefy/docs 4.0.0-alpha.7 → 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/operators/client/filter_default_value.js +55 -0
- package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +1 -19
- package/{templates/blocks/schemaTransformer.js → dist/types.js} +5 -10
- package/package.json +19 -3
- package/404.yaml +0 -26
- package/CHANGELOG.md +0 -697
- package/actions/CallMethod.yaml +0 -57
- package/actions/JsAction.yaml +0 -281
- package/actions/Link.yaml +0 -120
- package/actions/Login.yaml +0 -123
- package/actions/Logout.yaml +0 -44
- package/actions/Message.yaml +0 -68
- package/actions/Notification.yaml +0 -84
- package/actions/Request.yaml +0 -70
- package/actions/Reset.yaml +0 -42
- package/actions/ResetValidation.yaml +0 -102
- package/actions/ScrollTo.yaml +0 -100
- package/actions/SetGlobal.yaml +0 -78
- package/actions/SetState.yaml +0 -85
- package/actions/Throw.yaml +0 -89
- package/actions/Validate.yaml +0 -104
- package/actions/Wait.yaml +0 -40
- package/blocks/all_icons.yaml +0 -803
- package/blocks/container/Affix.yaml +0 -26
- package/blocks/container/Alert.yaml +0 -27
- package/blocks/container/Badge.yaml +0 -27
- package/blocks/container/Box.yaml +0 -27
- package/blocks/container/Card.yaml +0 -29
- package/blocks/container/Collapse.yaml +0 -38
- package/blocks/container/Comment.yaml +0 -43
- package/blocks/container/ConfirmModal.yaml +0 -36
- package/blocks/container/Descriptions.yaml +0 -51
- package/blocks/container/Drawer.yaml +0 -46
- package/blocks/container/Label.yaml +0 -28
- package/blocks/container/Modal.yaml +0 -46
- package/blocks/container/PageHCF.yaml +0 -28
- package/blocks/container/PageHCSF.yaml +0 -29
- package/blocks/container/PageHSCF.yaml +0 -29
- package/blocks/container/PageHeaderMenu.yaml +0 -52
- package/blocks/container/PageSHCF.yaml +0 -29
- package/blocks/container/PageSiderMenu.yaml +0 -53
- package/blocks/container/Result.yaml +0 -34
- package/blocks/container/Span.yaml +0 -27
- package/blocks/container/Spin.yaml +0 -27
- package/blocks/container/Tabs.yaml +0 -41
- package/blocks/container/Tooltip.yaml +0 -38
- package/blocks/display/Anchor.yaml +0 -25
- package/blocks/display/Avatar.yaml +0 -23
- package/blocks/display/Breadcrumb.yaml +0 -28
- package/blocks/display/Button.yaml +0 -43
- package/blocks/display/DangerousHtml.yaml +0 -62
- package/blocks/display/DangerousMarkdown.yaml +0 -46
- package/blocks/display/Divider.yaml +0 -23
- package/blocks/display/EChart.yaml +0 -53
- package/blocks/display/Html.yaml +0 -50
- package/blocks/display/Icon.yaml +0 -23
- package/blocks/display/Img.yaml +0 -40
- package/blocks/display/Markdown.yaml +0 -31
- package/blocks/display/MarkdownWithCode.yaml +0 -46
- package/blocks/display/Menu.yaml +0 -48
- package/blocks/display/Message.yaml +0 -34
- package/blocks/display/MobileMenu.yaml +0 -47
- package/blocks/display/Notification.yaml +0 -34
- package/blocks/display/Paragraph.yaml +0 -30
- package/blocks/display/Progress.yaml +0 -52
- package/blocks/display/Skeleton.yaml +0 -27
- package/blocks/display/Statistic.yaml +0 -35
- package/blocks/display/Title.yaml +0 -32
- package/blocks/input/AutoComplete.yaml +0 -30
- package/blocks/input/ButtonSelector.yaml +0 -36
- package/blocks/input/CheckboxSelector.yaml +0 -36
- package/blocks/input/CheckboxSwitch.yaml +0 -56
- package/blocks/input/ChromeColorSelector.yaml +0 -24
- package/blocks/input/CircleColorSelector.yaml +0 -24
- package/blocks/input/ColorSelector.yaml +0 -24
- package/blocks/input/CompactColorSelector.yaml +0 -24
- package/blocks/input/DateRangeSelector.yaml +0 -26
- package/blocks/input/DateSelector.yaml +0 -26
- package/blocks/input/DateTimeSelector.yaml +0 -28
- package/blocks/input/GithubColorSelector.yaml +0 -24
- package/blocks/input/MonthSelector.yaml +0 -26
- package/blocks/input/MultipleSelector.yaml +0 -117
- package/blocks/input/NumberInput.yaml +0 -24
- package/blocks/input/Pagination.yaml +0 -33
- package/blocks/input/ParagraphInput.yaml +0 -32
- package/blocks/input/PasswordInput.yaml +0 -48
- package/blocks/input/RadioSelector.yaml +0 -36
- package/blocks/input/RatingSlider.yaml +0 -24
- package/blocks/input/S3UploadButton.yaml +0 -28
- package/blocks/input/Selector.yaml +0 -98
- package/blocks/input/SliderColorSelector.yaml +0 -24
- package/blocks/input/SwatchesColorSelector.yaml +0 -24
- package/blocks/input/Switch.yaml +0 -24
- package/blocks/input/TextArea.yaml +0 -27
- package/blocks/input/TextInput.yaml +0 -59
- package/blocks/input/TitleInput.yaml +0 -32
- package/blocks/input/TwitterColorSelector.yaml +0 -24
- package/blocks/input/WeekSelector.yaml +0 -26
- package/blocks/list/ControlledList.yaml +0 -191
- package/blocks/list/List.yaml +0 -157
- package/blocks/list/TimelineList.yaml +0 -136
- package/body.html +0 -1
- package/concepts/blocks.yaml +0 -249
- package/concepts/cli.yaml +0 -173
- package/concepts/connections-and-requests.yaml +0 -114
- package/concepts/context-and-state.yaml +0 -82
- package/concepts/custom-blocks.yaml +0 -190
- package/concepts/custom-code.yaml +0 -197
- package/concepts/events-and-actions.yaml +0 -224
- package/concepts/hosting-files.yaml +0 -50
- package/concepts/layout.yaml +0 -1464
- package/concepts/lists.yaml +0 -162
- package/concepts/lowdefy-schema.yaml +0 -245
- package/concepts/operators.yaml +0 -66
- package/concepts/overview.yaml +0 -48
- package/concepts/secrets.yaml +0 -56
- package/connections/AWSS3.yaml +0 -228
- package/connections/AmazonRedshift.yaml +0 -75
- package/connections/AxiosHttp.yaml +0 -194
- package/connections/Elasticsearch.yaml +0 -378
- package/connections/GoogleSheet.yaml +0 -332
- package/connections/Knex.yaml +0 -181
- package/connections/KnexRequests.md +0 -121
- package/connections/MSSQL.yaml +0 -90
- package/connections/MariaDB.yaml +0 -77
- package/connections/MongoDB.yaml +0 -581
- package/connections/MySQL.yaml +0 -92
- package/connections/OracleDB.yaml +0 -73
- package/connections/PostgreSQL.yaml +0 -99
- package/connections/Redis.yaml +0 -147
- package/connections/SQLite.yaml +0 -94
- package/connections/SendGridMail.yaml +0 -113
- package/connections/Stripe.yaml +0 -139
- package/deployment/aws-lambda.yaml +0 -128
- package/deployment/docker.yaml +0 -118
- package/deployment/netlify.yaml +0 -69
- package/deployment/node-server.yaml +0 -111
- package/head.html +0 -7
- package/howto/generate-csv.yaml.njk +0 -252
- package/howto/generate-pdf.yaml.njk +0 -651
- package/howto/generateCsv/lowdefy.yaml +0 -64
- package/howto/generateCsv/public/csvMake.js +0 -27
- package/howto/generatePdf/inv_template.yaml +0 -200
- package/howto/generatePdf/lowdefy.yaml +0 -117
- package/howto/generatePdf/my_header.html +0 -1
- package/howto/generatePdf/public/logo_example.png +0 -0
- package/howto/generatePdf/public/modules/importUmd.js +0 -7
- package/howto/generatePdf/public/modules/pdfMake.js +0 -7
- package/howto/generatePdf/public/modules/vfs_fonts.js +0 -12
- package/howto/use-refrences.md +0 -5
- package/introduction.yaml +0 -100
- package/lowdefy.yaml +0 -66
- package/menus.yaml +0 -832
- package/operators/_actions.yaml +0 -123
- package/operators/_and.yaml +0 -90
- package/operators/_args.yaml +0 -79
- package/operators/_array.yaml +0 -326
- package/operators/_base64.yaml +0 -56
- package/operators/_change_case.yaml +0 -347
- package/operators/_date.yaml +0 -71
- package/operators/_diff.yaml +0 -75
- package/operators/_divide.yaml +0 -46
- package/operators/_eq.yaml +0 -67
- package/operators/_event.yaml +0 -103
- package/operators/_format.yaml +0 -209
- package/operators/_function.yaml +0 -66
- package/operators/_get.yaml +0 -108
- package/operators/_global.yaml +0 -107
- package/operators/_gt.yaml +0 -65
- package/operators/_gte.yaml +0 -65
- package/operators/_hash.yaml +0 -109
- package/operators/_if.yaml +0 -44
- package/operators/_if_none.yaml +0 -61
- package/operators/_index.yaml +0 -65
- package/operators/_input.yaml +0 -114
- package/operators/_js.yaml +0 -189
- package/operators/_json.yaml +0 -128
- package/operators/_list_contexts.yaml +0 -37
- package/operators/_location.yaml +0 -59
- package/operators/_log.yaml +0 -36
- package/operators/_lt.yaml +0 -65
- package/operators/_lte.yaml +0 -65
- package/operators/_math.yaml +0 -374
- package/operators/_media.yaml +0 -86
- package/operators/_menu.yaml +0 -81
- package/operators/_mql.yaml +0 -101
- package/operators/_ne.yaml +0 -77
- package/operators/_not.yaml +0 -47
- package/operators/_number.yaml +0 -157
- package/operators/_nunjucks.yaml +0 -73
- package/operators/_object.yaml +0 -193
- package/operators/_operator.yaml +0 -47
- package/operators/_or.yaml +0 -81
- package/operators/_product.yaml +0 -59
- package/operators/_random.yaml +0 -104
- package/operators/_ref.yaml +0 -266
- package/operators/_regex.yaml +0 -83
- package/operators/_request.yaml +0 -50
- package/operators/_secret.yaml +0 -74
- package/operators/_state.yaml +0 -114
- package/operators/_string.yaml +0 -283
- package/operators/_subtract.yaml +0 -38
- package/operators/_sum.yaml +0 -59
- package/operators/_switch.yaml +0 -51
- package/operators/_type.yaml +0 -92
- package/operators/_uri.yaml +0 -56
- package/operators/_url_query.yaml +0 -120
- package/operators/_user.yaml +0 -107
- package/operators/_uuid.yaml +0 -114
- package/operators/_var.yaml +0 -105
- package/operators/_yaml.yaml +0 -107
- package/pages.yaml +0 -227
- package/public/images/authors/gervwyk.jpeg +0 -0
- package/public/images/authors/sandile.jpeg +0 -0
- package/public/images/howto/header_generate_csv.jpg +0 -0
- package/public/images/howto/header_generate_pdf.jpg +0 -0
- package/public/logo_example.png +0 -0
- package/public/lowdefy_app_schema.png +0 -0
- package/public/modules/csvMake.js +0 -27
- package/public/modules/filterDefaultValue.js +0 -48
- package/public/modules/importUmd.js +0 -7
- package/public/modules/index.js +0 -5
- package/public/modules/pdfMake.js +0 -7
- package/public/modules/test/filterDefaultValue.test.js +0 -91
- package/public/modules/vfs_fonts.js +0 -12
- package/public/sitemap.xml +0 -1024
- package/templates/actions.yaml.njk +0 -68
- package/templates/blocks/defaultValueTransformer.js +0 -53
- package/templates/blocks/exampleTransformer.js +0 -81
- package/templates/blocks/layout.yaml +0 -114
- package/templates/blocks/propertiesFormTransformer.js +0 -419
- package/templates/blocks/propertiesGetterTransformer.js +0 -132
- package/templates/blocks/schema.yaml.njk +0 -42
- package/templates/blocks/style.yaml +0 -26
- package/templates/blocks/template.yaml.njk +0 -495
- package/templates/blog.yaml.njk +0 -221
- package/templates/cli_command.yaml.njk +0 -37
- package/templates/footer.yaml.njk +0 -604
- package/templates/general.yaml.njk +0 -124
- package/templates/generateSitemap.js +0 -41
- package/templates/header.yaml +0 -138
- package/templates/navigation_buttons.yaml +0 -68
- package/templates/operators.yaml.njk +0 -82
- package/templates/operatorsMethodTransformer.js +0 -119
- package/templates/test/array.test.js +0 -1335
- package/templates/test/boolean.test.js +0 -98
- package/templates/test/button.test.js +0 -166
- package/templates/test/color.test.js +0 -126
- package/templates/test/enum.test.js +0 -105
- package/templates/test/icon.test.js +0 -109
- package/templates/test/integer.test.js +0 -99
- package/templates/test/manual.test.js +0 -238
- package/templates/test/number.test.js +0 -99
- package/templates/test/object.test.js +0 -434
- package/templates/test/oneOf.test.js +0 -794
- package/templates/test/string.test.js +0 -98
- package/templates/test/yaml.test.js +0 -605
- package/tutorial/next-steps.yaml +0 -83
- package/tutorial/tutorial-actions-operators-config.yaml +0 -142
- package/tutorial/tutorial-actions-operators.yaml +0 -436
- package/tutorial/tutorial-add-blocks-config.yaml +0 -109
- package/tutorial/tutorial-add-blocks.yaml +0 -195
- package/tutorial/tutorial-create-page-config.yaml +0 -77
- package/tutorial/tutorial-create-page.yaml +0 -196
- package/tutorial/tutorial-deploy.yaml +0 -146
- package/tutorial/tutorial-requests-config.yaml +0 -186
- package/tutorial/tutorial-requests.yaml +0 -338
- package/tutorial/tutorial-start.yaml +0 -282
- package/users/login-and-logout.yaml +0 -164
- package/users/openid-connect.yaml +0 -84
- package/users/protected-pages.yaml +0 -67
- package/users/roles.yaml +0 -70
- package/users/user-object.yaml +0 -73
- package/users/users-introduction.yaml +0 -80
- package/version.yaml +0 -1
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
# Copyright 2020-2021 Lowdefy, Inc
|
|
2
|
-
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
_ref:
|
|
16
|
-
path: templates/general.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: Elasticsearch
|
|
19
|
-
pageTitle: Elasticsearch
|
|
20
|
-
section: Connections
|
|
21
|
-
filePath: connections/Elasticsearch.yaml
|
|
22
|
-
content:
|
|
23
|
-
- id: markdown
|
|
24
|
-
type: MarkdownWithCode
|
|
25
|
-
properties:
|
|
26
|
-
content: |
|
|
27
|
-
## Connections
|
|
28
|
-
|
|
29
|
-
Connection types:
|
|
30
|
-
- Elasticsearch
|
|
31
|
-
|
|
32
|
-
### Elasticsearch
|
|
33
|
-
|
|
34
|
-
[`Elasticsearch`](https://www.elastic.co/elasticsearch/) is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease.
|
|
35
|
-
|
|
36
|
-
The Elasticsearch connection can be used to search for documents in your Elasticsearch cluster. Lowdefy integrates with Elasticsearch using the official [Node.js client from Elastic Co.](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/introduction.html), and provides direct access to the full query DSL supported by Elasticsearch.
|
|
37
|
-
|
|
38
|
-
#### Properties
|
|
39
|
-
- `node: string|string[]`: __Required__ - Elasticsearch node(s) to connect to.
|
|
40
|
-
- `index: string`: The default index to query. You can also provide a per-request index to override this setting.
|
|
41
|
-
- `auth: BasicAuth|CloudAuth`: The authentication data as an object, containing either basic auth credentials (as `username` and `password`), an API key (as `apiKey`), or Elastic Cloud credentials.
|
|
42
|
-
- `maxRetries: number`: Max number of retries for each request.
|
|
43
|
-
- `requestTimeout: number`: Max request timeout in milliseconds for each request.
|
|
44
|
-
|
|
45
|
-
The connection accepts many more advanced configuration options. They will be passed to the Elasticsearch client verbatim, so check out the [configuration instructions](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/basic-config.html) provided by Elastic.
|
|
46
|
-
|
|
47
|
-
#### Examples
|
|
48
|
-
|
|
49
|
-
###### Authenticated connection with reads and writes:
|
|
50
|
-
```yaml
|
|
51
|
-
connections:
|
|
52
|
-
- id: elasticsearch
|
|
53
|
-
type: Elasticsearch
|
|
54
|
-
properties:
|
|
55
|
-
write: true
|
|
56
|
-
node:
|
|
57
|
-
_secret: ELASTICSEARCH_HOST
|
|
58
|
-
auth:
|
|
59
|
-
username:
|
|
60
|
-
_secret: ELASTICSEARCH_USER
|
|
61
|
-
password:
|
|
62
|
-
_secret: ELASTICSEARCH_PASSWORD
|
|
63
|
-
```
|
|
64
|
-
Environment variables:
|
|
65
|
-
```
|
|
66
|
-
LOWDEFY_SECRET_ELASTICSEARCH_HOST = http://localhost:9200
|
|
67
|
-
LOWDEFY_SECRET_ELASTICSEARCH_USER = es
|
|
68
|
-
LOWDEFY_SECRET_ELASTICSEARCH_PASSWORD = password
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
###### Unauthenticated connection with default index:
|
|
72
|
-
```yaml
|
|
73
|
-
connections:
|
|
74
|
-
- id: elasticsearch
|
|
75
|
-
type: Elasticsearch
|
|
76
|
-
properties:
|
|
77
|
-
write: true
|
|
78
|
-
node:
|
|
79
|
-
_secret: ELASTICSEARCH_HOST
|
|
80
|
-
index:
|
|
81
|
-
_secret: ELASTICSEARCH_INDEX
|
|
82
|
-
```
|
|
83
|
-
Environment variables:
|
|
84
|
-
```
|
|
85
|
-
LOWDEFY_SECRET_ELASTICSEARCH_HOST = http://localhost:9200
|
|
86
|
-
LOWDEFY_SECRET_ELASTICSEARCH_INDEX = articles
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Requests
|
|
90
|
-
|
|
91
|
-
Request types:
|
|
92
|
-
- ElasticsearchDelete
|
|
93
|
-
- ElasticsearchDeleteByQuery
|
|
94
|
-
- ElasticsearchIndex
|
|
95
|
-
- ElasticsearchSearch
|
|
96
|
-
- ElasticsearchUpdate
|
|
97
|
-
- ElasticsearchUpdateByQuery
|
|
98
|
-
|
|
99
|
-
### ElasticsearchDelete
|
|
100
|
-
|
|
101
|
-
The `ElasticsearchDelete` request removes a JSON document from the specified index.
|
|
102
|
-
|
|
103
|
-
#### Properties
|
|
104
|
-
- `id: string|number`: __Required__ - Unique identifier for the document to be deleted.
|
|
105
|
-
- `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).
|
|
106
|
-
- `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).
|
|
107
|
-
- `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`.
|
|
108
|
-
- `routing: string` Custom value used to route operations to a specific shard.
|
|
109
|
-
- `timeout: string` Period to [wait for active shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards). Defaults to 1m (one minute).
|
|
110
|
-
- `version: integer` Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
|
111
|
-
- `version_type` Specific version type: `external`, `external_gte`.
|
|
112
|
-
- `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.
|
|
113
|
-
See [Active Shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards).
|
|
114
|
-
|
|
115
|
-
#### Examples
|
|
116
|
-
|
|
117
|
-
###### Delete a document:
|
|
118
|
-
```yaml
|
|
119
|
-
requests:
|
|
120
|
-
- id: delete_document
|
|
121
|
-
type: ElasticsearchDelete
|
|
122
|
-
properties:
|
|
123
|
-
id:
|
|
124
|
-
_state: selected_id
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### ElasticsearchDeleteByQuery
|
|
128
|
-
|
|
129
|
-
The `ElasticsearchDeleteByQuery` request deletes documents that match the specified query.
|
|
130
|
-
|
|
131
|
-
#### Properties
|
|
132
|
-
- `body: object` The Elasticsearch query body, expressed in the [JSON Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html).
|
|
133
|
-
- `query: object`: The Elasticsearch query.
|
|
134
|
-
- `_source: string|string[]|boolean`: True or false to return the `_source` field or not, or a list of fields to return.
|
|
135
|
-
- `_source_excludes: string|string[]`: A list of fields to exclude from the returned `_source` field.
|
|
136
|
-
- `_source_includes: string|string[]`: A list of fields to extract and return from the `_source` field.
|
|
137
|
-
- `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).
|
|
138
|
-
- `max_docs: number` Maximum number of documents to process. Defaults to all documents.
|
|
139
|
-
- `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`.
|
|
140
|
-
- `requests_per_second: number` The throttle for this request in sub-requests per second. Defaults to -1 (no throttle).
|
|
141
|
-
- `analyzer: string`: The analyzer to use for the query string
|
|
142
|
-
- `default_operator: string`: The default operator for query string query (AND or OR).
|
|
143
|
-
- `df: string`: The field to use as default where no field prefix is given in the query string.
|
|
144
|
-
- `from: number`: Starting offset.
|
|
145
|
-
- `size: number`: Number of hits to return.
|
|
146
|
-
- `index: string|string[]`: A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices.
|
|
147
|
-
- `lenient: boolean`: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.
|
|
148
|
-
- `scroll: string`: Specify how long a consistent view of the index should be maintained for scrolled search.
|
|
149
|
-
- `sort: string|string[]`: A comma-separated list of <field>:<direction> pairs.
|
|
150
|
-
|
|
151
|
-
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-delete-by-query.html#docs-delete-by-query-api-query-params) provided by Elastic.
|
|
152
|
-
|
|
153
|
-
#### Examples
|
|
154
|
-
|
|
155
|
-
###### Delete all comments by a user:
|
|
156
|
-
```yaml
|
|
157
|
-
requests:
|
|
158
|
-
- id: delete_multiple
|
|
159
|
-
type: ElasticsearchUpdate
|
|
160
|
-
properties:
|
|
161
|
-
body:
|
|
162
|
-
query:
|
|
163
|
-
term:
|
|
164
|
-
user.id:
|
|
165
|
-
_state: selected_user
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### ElasticsearchIndex
|
|
169
|
-
|
|
170
|
-
The `ElasticsearchIndex` request 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.
|
|
171
|
-
|
|
172
|
-
#### Properties
|
|
173
|
-
- `body: object` The Elasticsearch request body contains the JSON source for the document data.
|
|
174
|
-
- `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).
|
|
175
|
-
- `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).
|
|
176
|
-
- `op_type: 'create'|'index'` 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`.
|
|
177
|
-
- `pipeline: string` ID of the pipeline to use to preprocess incoming documents.
|
|
178
|
-
- `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`.
|
|
179
|
-
- `routing: string` Custom value used to route operations to a specific shard.
|
|
180
|
-
- `timeout: string` Period the request waits for the following operations:
|
|
181
|
-
- [Automatic index creation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-creation)
|
|
182
|
-
- [Dynamic mapping](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/dynamic-mapping.html) updates
|
|
183
|
-
- [Waiting for active shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards)
|
|
184
|
-
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.
|
|
185
|
-
- `version: integer` Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
|
|
186
|
-
- `version_type` Specific version type: `external`, `external_gte`.
|
|
187
|
-
- `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.
|
|
188
|
-
See [Active Shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards).
|
|
189
|
-
- `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`.
|
|
190
|
-
|
|
191
|
-
#### Examples
|
|
192
|
-
|
|
193
|
-
###### Index a new document.
|
|
194
|
-
```yaml
|
|
195
|
-
requests:
|
|
196
|
-
- id: insert_new_comment
|
|
197
|
-
type: Elasticsearch
|
|
198
|
-
connectionId: elasticsearch
|
|
199
|
-
properties:
|
|
200
|
-
body:
|
|
201
|
-
comment:
|
|
202
|
-
_state: comment_input
|
|
203
|
-
user_id:
|
|
204
|
-
_user: id
|
|
205
|
-
timestamp:
|
|
206
|
-
_date: now
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### ElasticsearchSearch
|
|
210
|
-
|
|
211
|
-
The `ElasticsearchSearch` request searches the Elasticsearch index.
|
|
212
|
-
|
|
213
|
-
#### Properties
|
|
214
|
-
- `body: object` The Elasticsearch query body, expressed in the [JSON Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html).
|
|
215
|
-
- `query: object`: The Elasticsearch query.
|
|
216
|
-
- `aggs: object`: The [aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html) to request from the server.
|
|
217
|
-
- `_source: string|string[]|boolean`: True or false to return the _source field or not, or a list of fields to return.
|
|
218
|
-
- `_source_excludes: string|string[]`: A list of fields to exclude from the returned _source field.
|
|
219
|
-
- `_source_includes: string|string[]`: A list of fields to extract and return from the _source field.
|
|
220
|
-
- `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).
|
|
221
|
-
- `allow_partial_search_results: boolean`: Indicate if an error should be returned if there is a partial search failure or timeout.
|
|
222
|
-
- `analyzer: string`: The analyzer to use for the query string
|
|
223
|
-
- `default_operator: string`: The default operator for query string query (AND or OR).
|
|
224
|
-
- `df: string`: The field to use as default where no field prefix is given in the query string.
|
|
225
|
-
- `from: number`: Starting offset.
|
|
226
|
-
- `size: number`: Number of hits to return.
|
|
227
|
-
- `index: string|string[]`: A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices.
|
|
228
|
-
- `lenient: boolean`: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.
|
|
229
|
-
- `scroll: string`: Specify how long a consistent view of the index should be maintained for scrolled search.
|
|
230
|
-
- `sort: string|string[]`: A comma-separated list of <field>:<direction> pairs.
|
|
231
|
-
|
|
232
|
-
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.
|
|
233
|
-
|
|
234
|
-
#### Examples
|
|
235
|
-
|
|
236
|
-
###### Fetch the first 10 matching documents.
|
|
237
|
-
```yaml
|
|
238
|
-
requests:
|
|
239
|
-
- id: fetch_docs
|
|
240
|
-
type: Elasticsearch
|
|
241
|
-
connectionId: elasticsearch
|
|
242
|
-
properties:
|
|
243
|
-
size: 10
|
|
244
|
-
body:
|
|
245
|
-
query:
|
|
246
|
-
match_all: {}
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
###### Find a document with ID 42.
|
|
250
|
-
```yaml
|
|
251
|
-
requests:
|
|
252
|
-
- id: fetch_docs
|
|
253
|
-
type: Elasticsearch
|
|
254
|
-
connectionId: elasticsearch
|
|
255
|
-
properties:
|
|
256
|
-
size: 1
|
|
257
|
-
body:
|
|
258
|
-
query:
|
|
259
|
-
term:
|
|
260
|
-
_id: 42
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
###### Fetch articles between yesterday and today, aggregate by author.
|
|
264
|
-
```yaml
|
|
265
|
-
requests:
|
|
266
|
-
- id: fetch_docs
|
|
267
|
-
type: Elasticsearch
|
|
268
|
-
connectionId: elasticsearch
|
|
269
|
-
properties:
|
|
270
|
-
size: 1
|
|
271
|
-
type: article
|
|
272
|
-
body:
|
|
273
|
-
query:
|
|
274
|
-
range:
|
|
275
|
-
timestamp:
|
|
276
|
-
gte: now-1d/d
|
|
277
|
-
lt: now/d
|
|
278
|
-
aggs:
|
|
279
|
-
author_aggregation:
|
|
280
|
-
terms:
|
|
281
|
-
field: author
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### ElasticsearchUpdate
|
|
285
|
-
|
|
286
|
-
The `ElasticsearchUpdate` request updates a document using a script or partial document.
|
|
287
|
-
|
|
288
|
-
#### Properties
|
|
289
|
-
- `id: string|number` Unique identifier for the document to be updated.
|
|
290
|
-
- `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.
|
|
291
|
-
- `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).
|
|
292
|
-
- `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).
|
|
293
|
-
- `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`.
|
|
294
|
-
- `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`.
|
|
295
|
-
- `retry_on_conflict: boolean` Specify how many times should the operation be retried when a conflict occurs. Default: `0`.
|
|
296
|
-
- `routing: string` Custom value used to route operations to a specific shard.
|
|
297
|
-
- `_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.
|
|
298
|
-
- `_source_excludes: string[]` Specify the source fields you want to exclude.
|
|
299
|
-
- `_source_includes: string[]` Specify the source fields you want to include.
|
|
300
|
-
- `timeout: string` Period the request waits for the following operations:
|
|
301
|
-
- [Dynamic mapping](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/dynamic-mapping.html) updates
|
|
302
|
-
- [Waiting for active shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards)
|
|
303
|
-
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.
|
|
304
|
-
- `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.
|
|
305
|
-
See [Active Shards](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-index_.html#index-wait-for-active-shards).
|
|
306
|
-
|
|
307
|
-
#### Examples
|
|
308
|
-
|
|
309
|
-
###### Update a document:
|
|
310
|
-
```yaml
|
|
311
|
-
requests:
|
|
312
|
-
- id: update
|
|
313
|
-
type: ElasticsearchUpdate
|
|
314
|
-
properties:
|
|
315
|
-
id:
|
|
316
|
-
_state: _id
|
|
317
|
-
body:
|
|
318
|
-
doc:
|
|
319
|
-
_state: name
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
###### Increase the like counter using a script:
|
|
323
|
-
```yaml
|
|
324
|
-
requests:
|
|
325
|
-
- id: increase_like_counter
|
|
326
|
-
type: ElasticsearchUpdate
|
|
327
|
-
properties:
|
|
328
|
-
id:
|
|
329
|
-
_state: _id
|
|
330
|
-
body:
|
|
331
|
-
script:
|
|
332
|
-
source: |
|
|
333
|
-
ctx._source.likes++
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
### ElasticsearchUpdateByQuery
|
|
337
|
-
|
|
338
|
-
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.
|
|
339
|
-
|
|
340
|
-
#### Properties
|
|
341
|
-
- `body: object` The Elasticsearch query body, expressed in the [JSON Query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html).
|
|
342
|
-
- `query: object`: The Elasticsearch query.
|
|
343
|
-
- `script: object` A [script](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-scripting-using.html) to update documents.
|
|
344
|
-
- `_source: string|string[]|boolean`: True or false to return the `_source` field or not, or a list of fields to return.
|
|
345
|
-
- `_source_excludes: string|string[]`: A list of fields to exclude from the returned `_source` field.
|
|
346
|
-
- `_source_includes: string|string[]`: A list of fields to extract and return from the `_source` field.
|
|
347
|
-
- `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).
|
|
348
|
-
- `max_docs: number` Maximum number of documents to process. Defaults to all documents.
|
|
349
|
-
- `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`.
|
|
350
|
-
- `requests_per_second: number` The throttle for this request in sub-requests per second. Defaults to -1 (no throttle).
|
|
351
|
-
- `analyzer: string`: The analyzer to use for the query string
|
|
352
|
-
- `default_operator: string`: The default operator for query string query (AND or OR).
|
|
353
|
-
- `df: string`: The field to use as default where no field prefix is given in the query string.
|
|
354
|
-
- `from: number`: Starting offset.
|
|
355
|
-
- `size: number`: Number of hits to return.
|
|
356
|
-
- `index: string|string[]`: A comma-separated list of index names to search; use _all or empty string to perform the operation on all indices.
|
|
357
|
-
- `lenient: boolean`: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.
|
|
358
|
-
- `scroll: string`: Specify how long a consistent view of the index should be maintained for scrolled search.
|
|
359
|
-
- `sort: string|string[]`: A comma-separated list of <field>:<direction> pairs.
|
|
360
|
-
|
|
361
|
-
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.
|
|
362
|
-
|
|
363
|
-
#### Examples
|
|
364
|
-
|
|
365
|
-
###### Update all red cars:
|
|
366
|
-
```yaml
|
|
367
|
-
requests:
|
|
368
|
-
- id: update_red_cars
|
|
369
|
-
type: ElasticsearchUpdateByQuery
|
|
370
|
-
properties:
|
|
371
|
-
body:
|
|
372
|
-
query:
|
|
373
|
-
term:
|
|
374
|
-
color:
|
|
375
|
-
value: red
|
|
376
|
-
script:
|
|
377
|
-
source: 'ctx._source.out_of_stock=true'
|
|
378
|
-
```
|