I got following query, and would like to use date math on the index part
like
index = "<logstash-stats-short-{now/d}>"
query = {
index: this.config.logstash.index,
type: this.config.logstash.type,
body: {
fields: ['@timestamp'],
size: 1,
sort: [
{
'@timestamp': 'desc'
}
],
so i get that request:
Elasticsearch DEBUG: 2016-12-01T14:23:35Z
starting request { method: 'POST',
path: '/%3Clogstash-stats-short-%7Bnow%2Fd%7D%3E/json/_search',
body:
{ fields: [ '@timestamp' ],
size: 1,
sort: [ [Object] ],
query: { filtered: [Object] } },
query: {} }
but only Bad Request as response