2021-11-17 17:59:00 +00:00
|
|
|
{
|
2022-01-27 05:25:16 +00:00
|
|
|
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/operations.schema.json",
|
2021-11-17 17:59:00 +00:00
|
|
|
"title": "Elasticsearch datasource",
|
|
|
|
|
"description": "A schema defining Elasticsearch datasource",
|
2022-01-17 07:08:17 +00:00
|
|
|
"type": "database",
|
2021-11-22 08:22:32 +00:00
|
|
|
"defaults": {
|
|
|
|
|
"query": "",
|
|
|
|
|
"operation": "search"
|
|
|
|
|
},
|
2021-11-17 17:59:00 +00:00
|
|
|
"properties": {
|
|
|
|
|
"operation": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Operation",
|
|
|
|
|
"key": "operation",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "dropdown-component-flip",
|
|
|
|
|
"description": "Single select dropdown for operation",
|
2022-01-17 07:08:17 +00:00
|
|
|
"list": [
|
2022-01-27 05:25:16 +00:00
|
|
|
{
|
|
|
|
|
"value": "search",
|
|
|
|
|
"name": "Search"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"value": "index_document",
|
|
|
|
|
"name": "Index a document"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"value": "get",
|
|
|
|
|
"name": "Get a document"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"value": "update",
|
|
|
|
|
"name": "Update a document"
|
|
|
|
|
}
|
2021-11-17 17:59:00 +00:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"search": {
|
|
|
|
|
"index": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Index",
|
|
|
|
|
"key": "index",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
2022-02-02 16:59:57 +00:00
|
|
|
"description": "Enter index",
|
|
|
|
|
"width": "320px",
|
|
|
|
|
"height": "36px",
|
|
|
|
|
"className": "codehinter-plugins",
|
|
|
|
|
"placeholder": "Enter index"
|
2021-11-17 17:59:00 +00:00
|
|
|
},
|
|
|
|
|
"query": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Query",
|
|
|
|
|
"key": "query",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"placeholder": "{ \"name\": \"\" }",
|
2021-11-21 04:14:26 +00:00
|
|
|
"description": "Enter query",
|
|
|
|
|
"height": "150px"
|
2021-11-17 17:59:00 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"index_document": {
|
|
|
|
|
"index": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Index",
|
|
|
|
|
"key": "index",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
2022-02-02 16:59:57 +00:00
|
|
|
"description": "Enter index",
|
|
|
|
|
"width": "320px",
|
|
|
|
|
"height": "36px",
|
|
|
|
|
"className": "codehinter-plugins",
|
|
|
|
|
"placeholder": "Enter index"
|
2021-11-17 17:59:00 +00:00
|
|
|
},
|
|
|
|
|
"body": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Body",
|
|
|
|
|
"key": "body",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"mode": "javascript",
|
|
|
|
|
"placeholder": "{ \"name\": \"The Hitchhikers Guide to the Galaxy\" }",
|
2021-11-21 04:14:26 +00:00
|
|
|
"description": "Enter body",
|
|
|
|
|
"height": "150px"
|
2021-11-17 17:59:00 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"get": {
|
|
|
|
|
"index": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Index",
|
|
|
|
|
"key": "index",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
2022-02-02 16:59:57 +00:00
|
|
|
"description": "Enter index",
|
|
|
|
|
"width": "320px",
|
|
|
|
|
"height": "36px",
|
|
|
|
|
"className": "codehinter-plugins",
|
|
|
|
|
"placeholder": "Enter index"
|
|
|
|
|
|
2021-11-17 17:59:00 +00:00
|
|
|
},
|
|
|
|
|
"id": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Id",
|
|
|
|
|
"key": "id",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
2022-02-02 16:59:57 +00:00
|
|
|
"description": "Enter id",
|
|
|
|
|
"width": "320px",
|
|
|
|
|
"height": "36px",
|
|
|
|
|
"className": "codehinter-plugins",
|
|
|
|
|
"placeholder": "Enter id"
|
2021-11-17 17:59:00 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"update": {
|
|
|
|
|
"index": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Index",
|
|
|
|
|
"key": "index",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
2022-02-02 16:59:57 +00:00
|
|
|
"description": "Enter index",
|
|
|
|
|
"width": "320px",
|
|
|
|
|
"height": "36px",
|
|
|
|
|
"className": "codehinter-plugins",
|
|
|
|
|
"placeholder": "Enter index"
|
2021-11-17 17:59:00 +00:00
|
|
|
},
|
|
|
|
|
"id": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "Id",
|
|
|
|
|
"key": "id",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
2022-02-02 16:59:57 +00:00
|
|
|
"description": "Enter id",
|
|
|
|
|
"width": "320px",
|
|
|
|
|
"height": "36px",
|
|
|
|
|
"className": "codehinter-plugins",
|
|
|
|
|
"placeholder": "Enter id"
|
2021-11-17 17:59:00 +00:00
|
|
|
},
|
|
|
|
|
"body": {
|
2022-01-17 07:08:17 +00:00
|
|
|
"label": "body",
|
|
|
|
|
"key": "body",
|
2021-11-17 17:59:00 +00:00
|
|
|
"type": "codehinter",
|
|
|
|
|
"mode": "javascript",
|
|
|
|
|
"placeholder": "{ doc: { page_count: 225 } }",
|
2021-11-21 04:14:26 +00:00
|
|
|
"description": "Enter body",
|
|
|
|
|
"height": "150px"
|
2021-11-17 17:59:00 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-01-27 05:25:16 +00:00
|
|
|
}
|