Auth0 Home Blog Docs

Case insensitive searches through Lucene Query Syntax

lucene
user-search

#1

Is it possible to do a case insensitive search with the Lucene Query Syntax?

q=given_name:maurits does not yield my user account, because my given_name starts with a capital letter M.

Is it possible with your current implementation of querying with Lucene? Maybe through a LOWERCASE modifier?

Hope to hear from you, as I’m preferring not to build pulling all user accounts and doing the search myself.


#2

@maurits I’ve tried this a few times in different tenants, and I haven’t found it to be case sensitive for searching. You should be able to find a user with given_name:maurits assuming that Maurits is an exact match (other than case). If there are any other characters, you need to use a wildcard to find the user.


#3

@maurits If the given_name is in user_metadata, then it will be case insensitive. Here are the docs around user search.


#4

Thank you for your response.

I overlooked the part about case sensitivity (https://auth0.com/docs/users/search/v3#migrate-from-search-engine-v2-to-v3) and I think you mean, also according to the docs, that values in user_metadata are case sensitive.

Is there a way to do a case insensitive search through values in user_metadata?


#5

@maurits unfortunately we do not support that at this time