How to customize sorting by elasticsearch

es version 2.4

data stores an int field with the following meaning

When

is 0, it means that there is no ranking
is 1, meaning that the first place is
is n (n > 0), the meaning is ranked n

ranking from high to low is in the order of 1Mui-> 2Mel-> 3->.--> NMUE-> 0
when ranking from low to high, the order is 0Mui-> NMUE->.--> 3MUE-> 2MUE-> 1

.

how does es achieve the above sort?
I am not familiar with es. I can only think of a stupid method, that is, inter-partition search, where 0 is an interval, > 0 is an interval, and when insufficient, take

from another interval.
Aug.14,2021
Menu