Currently, destroyAll issues a deleteByQuery operation with a query. Using a query causes ES to generate scores as part of the process and as a result has additional overhead.
As a general rule, filters should be used instead of queries:
for binary yes/no searches
for queries on exact values
Filters are very handy since they perform an order of magnitude better than plain queries since no scoring is performed and they are automatically cached.
Currently, destroyAll issues a deleteByQuery operation with a query. Using a query causes ES to generate scores as part of the process and as a result has additional overhead.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-filters.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html