The "add a filter" dialog only supports filters/queries, not other parts of an Elasticsearch _search request (such as aggs, size, etc.).
The only way to turn a generic query into an "object" is to use a "custom visualization" (e.g. Vega):
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.