Auth0 Home Blog Docs

User Metadata Search with capitalized values

management-api

#1

I’m using “search_engine=v3” to query user_metadata looking for “first_name” and “last_name” fields. When the value of the names are capitalized the name search with wildcards does not work.
For example,

q=user_metadata.first_name:"Adam"&search_engine=v3 - WORKS
q=user_metadata.first_name:*da*&search_engine=v3 - WORKS
q=user_metadata.first_name:*Adam*&search_engine=v3 - NO DATA
q=user_metadata.first_name:Ada*&search_engine=v3 - NO DATA
q=user_metadata.first_name:*dam&search_engine=v3 - NO DATA

Is this a documented limitation? Or something that will be changed soon?

Thank you.


#3

Per the docs (https://auth0.com/docs/users/search/v3#searchable-fields) what is surprising is that the second query works given that wildcards are not meant to be formally supported in user metadata fields:

Range and wildcard searches are not available on user metadata fields.

With the documented limitation above I would not even recommend to depend on the fact that you can still get results depending on how you tweak the query as assuming the docs are correct, which they should as it is a complete separate sentence unlikely to be added by mistake, the behavior may change without notice.


#4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.