Creating Query Templates
A query template can be created in the Releval UI, or by using the Create Query Template API.
Create in the Releval UI
On the Query Templates page, click Create Query Template to open the form. Provide a name and a Handlebars body — variables in the body are substituted with each query's values when the template renders against a query set.
Create Query Template API
The Create Query Template API can be used to create query templates:
{
"name": "Match Title",
"query_string": "?size={{size}}",
"body": "{\"query\":{\"match\":{\"title\":{\"query\":\"{{query}}\"}}",
"content_type": "json"
}