Hi Team,
Is there a way to programmatically build a search object and iterate through it's partitions? I am currently doing this by passing an incremental dict to my search object.
s = Search(using=client)
s = s.filter(**params)
i = 0
j = 100
while i < j:
partitions = {"partition": i, "num_partitions": j}
ns = copy.copy(s)
ns.aggs.bucket('first', 'terms', field='tags.keyword', size=100, include=partitions)
res = ns.execute()
index_data(res)
Is this the only approach we can take to get all the agg results? Or is there a method we can call?