Sorting on boolean and missing fields

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Sorting on boolean and missing fields

joshijee
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I have boolean mapping for the context.disabled and this is missing in maximum documents.. the i want the context.disabled =false should come at the last

POST person/_search
{
  "from" : 0,
  "size" : 20,
  "query" : {
    "filtered" : {
      "query" : {
        "match_all" : { }
      }
    }
  },
  "sort" : [
    {
      "contexts.disabled": {
        "order": "asc"
        ,"missing":"_first"
      }
    },{
    "profiles.name.lastName" : {
      "order" : "asc"
    }
  }, {
    "profiles.name.firstName" : {
      "order" : "asc"
    }
  }]
}