• 0 Votes
    2 Posts
    4k Views
    danD
    Hiya. You can see the elasticsearch query if you expand advanced in the UI. Because of the way that we tokenize the search string, it is likely that a query like user@example.com will match more than just the user with the email address you are entering. If you want to match only the email address in the UI, the easiest way to do it is to preface the query with email:. So email:user@example.com. Hope that helps.
  • 0 Votes
    2 Posts
    4k Views
    danD
    Yes, they are equivalent. Building this JSON: { "search": { "queryString": "fusionauth.io" } } and posting it is equivalent to a GET with queryString=fusionauth.io.
  • 1 Votes
    2 Posts
    7k Views
    danD
    I don't know of any issues. You’re mainly just giving up the ability to perform rich queries. The db search is a few LIKE statements. I don't think we've tested millions running db search - but the only issue I can think of for normal usage would be the User page in the UI since we’ll be paginating over lots of users. This should work ok - but pagination tends to slow way down as you get into higher pages,. One can always flip on Elastic and run an index, so not much harm in trying it.
  • Search for users by application

    Moved Q&A search user search application
    2
    0 Votes
    2 Posts
    4k Views
    danD
    You should be able to go the user's tab and then expand the 'advanced' section and select a given application. See this screenshot: [image: user search with 'advanced' section expanded]
  • Can we do a user search without a tenant id?

    Moved Q&A tenant user search
    2
    0 Votes
    2 Posts
    3k Views
    danD
    If you don't care about the possibility of duplicate users or you can handle them in your business logic (because tenants allow multiple users to have the same username or email address), you can use a globally scoped API key and just call the search API with the email address. For example, here a script I ran after creating two 'test@example.com' users in different tenants in one FusionAuth instance: curl -H "Authorization: $API_KEY" 'http://localhost:9011/api/user/search?queryString=test%40example.com' The API_KEY variable was a globally scoped API key (not scoped to one tenant). This returned this json (note, I'm running the database search engine, but the results should be similar if you are running elasticsearch): {"total":2,"users":[{"active":true,"email":"test@example.com","id":"0e3f0f4d-6795-4200-b044-9fea2437f0d2","insertInstant":1591914961640,"lastLoginInstant":1591914961678,"passwordChangeRequired":false,"passwordLastUpdateInstant":1591914961675,"tenantId":"1de156c2-2daa-a285-0c59-b52f9106d4e4","twoFactorDelivery":"None","twoFactorEnabled":false,"usernameStatus":"ACTIVE","verified":true},{"active":true,"email":"test@example.com","id":"6d145368-431b-4df1-aba4-5741bd7a9280","insertInstant":1592244970665,"lastLoginInstant":1592244970695,"passwordChangeRequired":false,"passwordLastUpdateInstant":1592244970690,"tenantId":"7b231917-733e-4347-b9e2-11915de60fc8","twoFactorDelivery":"None","twoFactorEnabled":false,"usernameStatus":"ACTIVE","verified":true}]}
  • 0 Votes
    6 Posts
    32k Views
    danD
    How would I do this kind of search for users within a Postgresql database, I'm not using ElasticSearch. Sorry, you cannot. Unfortunately you can't search beyond fuzzy matching on the parameters listed in the database search documentation. If you have advanced search needs, we recommend running elasticsearch, which is extremely powerful and flexible. Here's a tutorial on switching search engines: https://fusionauth.io/docs/v1/tech/tutorials/switch-search-engines/
  • 0 Votes
    4 Posts
    17k Views
    danD
    Here's a doc about how to switch search engines: https://fusionauth.io/docs/v1/tech/tutorials/switch-search-engines