2021-11-17 17:59:00 +00:00
|
|
|
{
|
|
|
|
|
"$schema": "https://json-schema.org/",
|
|
|
|
|
"$id": "https://tooljet.io/dataqueries/Elasticsearch.schema.json",
|
|
|
|
|
"title": "Elasticsearch datasource",
|
|
|
|
|
"description": "A schema defining Elasticsearch datasource",
|
|
|
|
|
"type": "object",
|
2021-11-22 08:22:32 +00:00
|
|
|
"defaults": {
|
|
|
|
|
"query": "",
|
|
|
|
|
"operation": "search"
|
|
|
|
|
},
|
2021-11-17 17:59:00 +00:00
|
|
|
"properties": {
|
|
|
|
|
"operation": {
|
|
|
|
|
"$label": "Operation",
|
|
|
|
|
"$key": "operation",
|
|
|
|
|
"type": "dropdown-component-flip",
|
|
|
|
|
"description": "Single select dropdown for operation",
|
|
|
|
|
"$options": [
|
|
|
|
|
{ "value": "search", "name": "Search" },
|
|
|
|
|
{ "value": "index_document", "name": "Index a document" },
|
|
|
|
|
{ "value": "get", "name": "Get a document" },
|
|
|
|
|
{ "value": "update", "name": "Update a document" }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"search": {
|
|
|
|
|
"index": {
|
|
|
|
|
"$label": "Index",
|
|
|
|
|
"$key": "index",
|
|
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
|
|
|
|
"description": "Enter index"
|
|
|
|
|
},
|
|
|
|
|
"query": {
|
|
|
|
|
"$label": "Query",
|
|
|
|
|
"$key": "query",
|
|
|
|
|
"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": {
|
|
|
|
|
"$label": "Index",
|
|
|
|
|
"$key": "index",
|
|
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
|
|
|
|
"description": "Enter index"
|
|
|
|
|
},
|
|
|
|
|
"body": {
|
|
|
|
|
"$label": "Body",
|
|
|
|
|
"$key": "body",
|
|
|
|
|
"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": {
|
|
|
|
|
"$label": "Index",
|
|
|
|
|
"$key": "index",
|
|
|
|
|
"className": "col-6",
|
|
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
|
|
|
|
"description": "Enter index"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"$label": "Id",
|
|
|
|
|
"$key": "id",
|
|
|
|
|
"className": "col-6",
|
|
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
|
|
|
|
"description": "Enter id"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"update": {
|
|
|
|
|
"index": {
|
|
|
|
|
"$label": "Index",
|
|
|
|
|
"$key": "index",
|
|
|
|
|
"className": "col-6",
|
|
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
|
|
|
|
"description": "Enter index"
|
|
|
|
|
},
|
|
|
|
|
"id": {
|
|
|
|
|
"$label": "Id",
|
|
|
|
|
"$key": "id",
|
|
|
|
|
"className": "col-6",
|
|
|
|
|
"type": "codehinter",
|
|
|
|
|
"lineNumbers": false,
|
|
|
|
|
"description": "Enter id"
|
|
|
|
|
},
|
|
|
|
|
"body": {
|
|
|
|
|
"$label": "body",
|
|
|
|
|
"$key": "body",
|
|
|
|
|
"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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|