FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Unable to sort by fullName when formatted as "lastName, firstName"

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    2
    12
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tnguyen
      last edited by

      Hi, new to FusionAuth, and having a basic issue of getting the list of users sorted correctly. My instance is v1.61.0 and using OpenSearch 2.11.0.

      I have some local users which I added through admin UI. Each have these fields populated:

      • email
      • phone number
      • user name
      • password
      • first name
      • last name
      • full name

      The fullName field is formatted as "lastName, firstName". When I search for all users and sort by fullName, the list is always coming back descending order (Z...A), regardless of the sortFields[n].order value. This is happening in both the admin UI and the search API.
      Note: I found that if I format the field as "lastName.firstName" (using "." instead of ", "), then sorting works correctly.

      I haven't customized the instance very much beyond the first-time setup, so I don't think I've changed anything that ought to affect this. Is there some place I can debug further about how it's trying to do the sort?

      mark.robustelliM 1 Reply Last reply Reply Quote 0
      • mark.robustelliM
        mark.robustelli @tnguyen
        last edited by

        I just did a search on 1.61.0 in the Admin UI and my results were sortable by the name. Can you give us the exact query you used to use the search API and the search you used in the search bar? I am curious to see if that returns something different.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post