I have a query in Elasticsearch 1.x like this:
{"filter": {"and": {"filters": [{"exists": {"field": "body"}}, {"query": {"term": {"accept": "true"}}},
{"exists": {"field": "thumbnail"}}, {"query": {"terms": {
"content": ["577f6ca06dd5340a97e89923"]}}}, {"range": {
"date": {"lt": "2018-01-05T04:07:48.901933", "gte": "1963-04-04T04:07:48.901933"}}},
{"query": {"terms": {
"agency": ["577ff7176dd5340a97e899b7"]}}}, {"query": {"terms": {
"subject": ["578c6c7f6dd5345f3db18e7b"]}}}, {"query": {
"terms": {"geographic": ["577f78fe6dd5340a97e89948"]}}}]}},
"fields": ["_id", "link", "title"], "from": 0,
"sort": {"date": {"order": "desc"}}, "size": 30}
It works in 1.x version but in 5.x version rises an error:
elasticsearch.exceptions.RequestError: TransportError(400, u'parsing_exception', u'Unknown key for a START_OBJECT in [filter].')
What should I do?