I tried to sort my users on the property blocked and it didn’t go as I expected. The property is not defined on most of my users, on a couple of them the value is false since I have blocked them and later un-blocked them. and on one user the value is set to true.
What I expected to happen was that when I set the sort=blocked:1 parameter to my /api/v2/users endpoint I would get the user that has the value true to be at the top of my response. What order of false and undefined has could be another discussion, but it seems that I don’t really get the sort to work. I’m not sure what the default sort order is on my response but it seems that the boolean property can not be sorted properly?
I notice that something changes in my response, the user with blocked:true gets lifted to the first page of my response if I have it sorted on the blocked-property, otherwise it is further back on another page. But I expected it to be the very first user in my response. Not the second or third as it is now…
As a reference I tried to sort on email_verified - another boolean property - but the result was the same.
Can anyone help me get an answer on how sort on boolean properties is expected to work?