I have cluster elasticsearch 6.3.2 of 3 nodes: master and 2 data node.I make a request on my index and the result order can be in three different states
if i do some request from kibana:
- GET index/_search?preference=node1 - one sort order
- GET index/_search?preference=node2 - another sort order
- GET index/_search - it can be three states of the sort order
request body is always constant
{
"from": 0,
"size": 30,
"query": {...},
"sort": [
{"_score": {"order": "desc"}},
{"_script": {
"script": {
"source": "long code = doc[\"test\"].value;
if(code== 0){return 4;}
if(code== 1){return 2;}
if(code== 2){return 1;}
else return code;",
"lang": "painless"
},
"type": "string",
"order": "desc"
}
},
{"test1": {"order": "desc"}},
{"test2": {"order": "asc"}}
]
"highlight": {...}
}
i expect the result order be always constant , but it does not