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

    Can I query a user on their user data?

    Scheduled Pinned Locked Moved
    Q&A
    user user-data search query faq
    2
    4
    8.4k
    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.
    • danD
      dan
      last edited by

      Hi, are there any examples of how to query users based on user data?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        You can experiment in the admin UI using the search field.

        You can use the query string DSL or a full JSON query in the search field, if you are running elastic search.

        Here's a link to building an ElasticSearch query (in version 6.3): https://www.elastic.co/guide/en/elasticsearch/reference/6.3/query-dsl-query-string-query.html

        For example if you have companyName in custom data, the query string would be data.companyName:"Acme Corp."

        If you are using the database search, you won't be able to use this kind of querying.

        Here's more on the difference between the database search and elasticsearch options for user search: https://fusionauth.io/docs/v1/tech/core-concepts/users#user-search

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • L
          le.nnyburkdoll
          last edited by

          @dan I have really same query can you find some way.

          danD 1 Reply Last reply Reply Quote 0
          • danD
            dan @le.nnyburkdoll
            last edited by

            @le-nnyburkdoll

            This guide might be helpful to you: https://fusionauth.io/docs/v1/tech/guides/user-search-with-elasticsearch

            Thanks,
            Dan

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

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