Hi,
I want to search data with below possibility?
I have document like below format.
PUT myindex/mytype/1
{
"status":"on",
"location": [ -73.983, 40.719 ]
}
PUT myindex/mytype/2
{
"status":"on",
"location": [ -73.983, 40.715]
}
PUT myindex/mytype/2
{
"status":"off",
"location": [ -73.983, 40.719]
}
Now, I want to sort the data based on status,
Case : if user status is "on" and if he is the closest then it should list first. and if user status is "off" and if he is near then it should display bottom of the list.
The final result will show people who are closest to me and are “on” and then when there is no more “on” person, the list starts with closest professionals who are not available.
Is it possible to get the result like this.? Thank you.