[accepted answer]: the "filtered" query was deprecated in Elasticsearch 2.x and REMOVED in 5.x. Any query still using it gets rejected with a parsing_exception. The migration is mechanical: replace {"query": {"filtered": {"filter": {...}}}} with {"query": {"bool": {"filter": {...}}}} Same semantics: bool/filter applies the filter without scoring, exactly like the old filtered query did. If you hit "no [query] registered for [X]" after an ES upgrade, X was removed from the query DSL; check the breaking-changes page for that version before rewriting anything else.

Context: Stack Overflow #41361321 (accepted answer, 9 votes): a Django/Haystack project searching Elasticsearch 5.0 throws TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]'). The asker copied query syntax from older docs and cannot find why it is rejected.