sort on index time

This commit is contained in:
Victor Shyba 2021-03-14 15:42:11 -03:00
parent b81305a4a9
commit a3e146dc68

View file

@ -61,7 +61,11 @@ class SearchIndex:
"index": "index":
{"refresh_interval": -1, {"refresh_interval": -1,
"number_of_shards": 1, "number_of_shards": 1,
"number_of_replicas": 0} "number_of_replicas": 0,
"sort": {
"field": ["trending_mixed", "release_time"],
"order": ["desc", "desc"]
}}
}, },
"mappings": { "mappings": {
"properties": { "properties": {
@ -82,6 +86,7 @@ class SearchIndex:
"claim_type": {"type": "byte"}, "claim_type": {"type": "byte"},
"censor_type": {"type": "byte"}, "censor_type": {"type": "byte"},
"trending_mixed": {"type": "float"}, "trending_mixed": {"type": "float"},
"release_time": {"type": "long"},
} }
} }
}, ignore=400 }, ignore=400