in nested/workload.py [0:0]
def params(self):
result = {
"body": {
"query": {
"bool": {
"must": [
{
"match": {
"tag": "%s" % random.choice(self.tags)
}
},
{
"nested": {
"path": "answers",
"query": {
"range": {
"answers.date": {
"lte": "%s" % random.choice(self.dates)
}
}
},
"inner_hits": {
"size": self._params["inner_hits_size"]
}
}
}
]
}
},
"size": self._params["size"]
},
"index": None
}
if "cache" in self._params:
result["cache"] = self._params["cache"]
return result