Sort results by date

This commit is contained in:
Mark Veidemanis 2022-07-21 13:51:38 +01:00
parent ddae8ef42e
commit b5ff784a0e
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,13 @@ def construct_query(query, fields, size):
"auto_generate_synonyms_phrase_query": True, "auto_generate_synonyms_phrase_query": True,
} }
}, },
"sort": [
{
"ts": {
"order": "desc",
}
}
],
} }
return query return query