Valid Regex template for parsing.
Template format
{
"A": "a",
"custom": "{[my_key]: [my_value]}}"
}
A valid [my_key]
is one of (or combination) :
- string e.g
foo
- nested object key e.g
foo.bar
- array key e.g
foo.1
- combinations like
foo.1.bar
A valid [my_value]
is a:
- string e.g
"bar"
- boolean e.g
true
- number e.g
1
Example JSON Template
{
"index": "myindex",
"body": {
"query": {
"match": {
"title": "{{Foo: true}}"
}
},
"facets": {
"tags": {
"terms": {
"field": "tags",
"cool": "{{foo:bar}}",
// String is the default type for default values
"t4": "{{foo:false}}",
"t5": "{{Foo}}",
// No default value
"t5": "{{is_cool_api:true}}",
"t6": "{{nice_name:false}}"
}
}
}
}
}