Below is my query dsl. Index number is unique integer. I want to sort the fetch datas. The query below sorts of documents in same index, but not sorting via different indexes. I mean if i select the date of today, it sorts all documents in today but not all days.
"size": 1,
"sort": [
{
"index_number.keyword": {
"order": "asc"
}
},
{
"_score": {
"order": "asc"
}
}
],
"query": {
"bool": {
"must": [
{
"term": {
"city_name": {
"value": "maribor"
}
}
},
{
"term": {
"username": {
"value": "marko"
}
}
},
{
"range": {
"@timestamp": {
"gte": "2017-02-05T00:00:00.000Z",
"lt": "2018-02-05T23:59:59.000Z"
}
}
}
]
}
}
When I delete "_score" on sorting mapping, it gives me
for doc in eval(json.dumps(resp['hits']['hits'])):
File "<string>", line 1, in <module>
NameError: name 'null' is not defined
Thanks for answering
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…