Script query | Elastic Documentation
Filters documents based on a provided script. The script query is typically used in a filter context. You can achieve the same results in a search query...