Elasticsearch : query does not support [filter]];

$ curl -XPOST 'localhost:9200/tindices/_search?pretty' -d '

{
"query": {
"bool": {
"must": { "match_all": {} },
"filter": {
"range": {
"balance": {
"gte": 20000,
"lte": 30000
}
}
}
}
}
}'
{
"error" : "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[gD01n50TSmSJLgTL_gPDPw][tindices][0]: SearchParseException[[tindices][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query": {\n "bool": {\n "must": { "match_all": {} },\n "filter": {\n "range": {\n "balance": {\n "gte": 20000,\n "lte": 30000\n }\n }\n }\n }\n }\n}]]]; nested: QueryParsingException[[tindices] [bool] query does not support [filter]]; }{[gD01n50TSmSJLgTL_gPDPw][tindices][1]: SearchParseException[[tindices][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query": {\n "bool": {\n "must": { "match_all": {} },\n "filter": {\n "range": {\n "balance": {\n "gte": 20000,\n "lte": 30000\n }\n }\n }\n }\n }\n}]]]; nested: QueryParsingException[[tindices] [bool] query does not support [filter]]; }{[gD01n50TSmSJLgTL_gPDPw][tindices][2]: SearchParseException[[tindices][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query": {\n "bool": {\n "must": { "match_all": {} },\n "filter": {\n "range": {\n "balance": {\n "gte": 20000,\n "lte": 30000\n }\n }\n }\n }\n }\n}]]]; nested: QueryParsingException[[tindices] [bool] query does not support [filter]]; }{[gD01n50TSmSJLgTL_gPDPw][tindices][3]: SearchParseException[[tindices][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query": {\n "bool": {\n "must": { "match_all": {} },\n "filter": {\n "range": {\n "balance": {\n "gte": 20000,\n "lte": 30000\n }\n }\n }\n }\n }\n}]]]; nested: QueryParsingException[[tindices] [bool] query does not support [filter]]; }{[gD01n50TSmSJLgTL_gPDPw][tindices][4]: SearchParseException[[tindices][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query": {\n "bool": {\n "must": { "match_all": {} },\n "filter": {\n "range": {\n "balance": {\n "gte": 20000,\n "lte": 30000\n }\n }\n }\n }\n }\n}]]]; nested: QueryParsingException[[tindices] [bool] query does not support [filter]]; }]",
"status" : 400
}

What is your elasticsearch version?

1.7.3

So read the right documentation: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/index.html

You are doing 2.x queries here.