Is there any way to search for registrations based off of username (or registration data)?
-
Q: Is there any way to search for registrations based off of username (or registration data)?
-
If you are using Elasticsearch yes..
If you want to search for a username in a particular registration (for a particular application)
{ "bool" : { "must" : [ { "bool" : { "must" : [ { "nested" : { "path" : "registrations", "query" : { "bool" : { "must" : [ { "match" : { "registrations.applicationId" : "3c219e58-ed0e-4b18-ad48-f4f92793ae32" } }, { "match" : { "registrations.username" : "bob" } } ] } } } } ] } } ] } }
Where the value for registrations.applicationId is the Id of your application and the username you are looking for is bob.
If you only wanted to search for a user with a username of bob you could just search on registrations.username:bob - but this would not limit the search to any particular application registration.