I was wondering why one query works and other doesnt. The top one gives me a parse error.
does not work:
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*",
"analyze_wildcard": true
}
},
"filter": {
"bool": {
"must": {
"0": {
"range": {
"@timestamp": {
"gte": "now-30d/d",
"lte": "now",
"format": "yyyy-MM-dd HH:mm:ss"
}
}
}
}
}
}
}
}
}
Works:
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": "*",
"analyze_wildcard": true
}
},
"filter": {
"bool": {
"must": [{
"range": {
"@timestamp": {
"gte": "now-30d/d",
"lte": "now",
"format": "yyyy-MM-dd HH:mm:ss"
}
}
}]
}
}
}
}
}