I am using elasticsearch primarily for aggregations, then eventually i came across setting the query size to zero, according to my understanding this helps in two ways :
- payload size is reduced
- and when we use query in filter context with size set to zero, elasticsearch internally caches the results .
I use python client to query my cluster. my doubt is,
will setting size=0 in es.search(index=index, body=query, size=0) automatically override the json query and enable cache