Elasticsearch Python Cache

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 :

  1. payload size is reduced
  2. 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

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.