Skip to content

sort option not working with searchUsers method #34

Description

@mdhiggins

Trying to run a searchUser query and despite my best efforts I cannot get the results to be sorted.

Sorting works in other areas of the project when querying objects, but seems to fail when searching users (or when retrieving all users).

I've tried the following:
var response = ws.searchUsers(search, {sort: 'last, first', skip: skip, limit: size, count: true});
var response = ws.searchUsers(search, {sort: 'last', skip: skip, limit: size, count: true});
var response = ws.searchUsers(search, {sort: 'last:desc', skip: skip, limit: size, count: true});
var response = ws.searchUsers(search, {sort: 'last'});

Each results is only sorted by what appears to be the date the user was added. Ideally I would like to sort by the last and first fields of the user object.

Here is a sample of the user object I am trying to sort, all user objects have the 'first' and 'last' parameters

{
  "__id__": "idgoeshere",
  "services": null,
  "__class__": "UserCM",
  "email": "email@gmail.com",
  "attending": false,
  "__type__": "user",
  "first": "FirstName",
  "last": "LastName",
  "__account__": {
    "email": "email@gmail.com",
    "username": "username"
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions