default query

This commit is contained in:
simon 2023-05-20 15:38:55 +07:00
parent 64984bc1b3
commit 5334d79d0d
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,9 @@ class IndexPaginate:
if not self.data:
self.data = {}
if "query" not in self.data.keys():
self.data.update({"query": {"match_all": {}}})
if "sort" not in self.data.keys():
self.data.update({"sort": [{"_doc": {"order": "desc"}}]})