Auth0 Home Blog Docs

Internal Server Error when trying to search for app_metadata.tenant_id



I maybe found a bug in the user search API.

I use a app_metadata_field to retrieve some users.
I search by using a lucene query like this : app_metadata.tenant_id:“test” but i receive a 500 error

 { "statusCode": 500, "error": "Internal Server Error", "message": "An internal server error occurred", "errorCode": "SearchPhaseExecutionException[Failed to execute phase [query_fetch], all shards failed; shardFailures {[B03gidRzQsSNhopxzxvb8A][users][0]: RemoteTransportException[production-user-data-es-i-02c4205da47ca3064-eu-central-1][inet[/]][indices:data/read/search[phase/query+fetch]]]; nested: SearchParseException[users][0]: from[0],size[50]: Parse Failure [Failed to parse source [{\"size\":50,\"from\":0,\"timeout\":\"5s\",\"query\":{\"query_string\":{\"query\":\"__meta.maxlab_app_metadata.tenant_id:\\\"test\\\"\"}},\"sort\":[{\"last_login\":{\"order\":\"desc\",\"missing\":0}}]}]]]; nested: NumberFormatException[For input string: \"test\"]; }]" } 

However when I try with a field named, for example t_id. It’s working ( q:app_metadata.t_id:“test” )


There was an incident (already addressed) reported yesterday that caused some search queries to fail (see more about this here). This may or may not explain your situation, but given a relatively close timeline between the question creation and the incident can you confirm if you’re still experiencing the issue?

As additional note, on my own account I was not able to reproduce the situation, but I may have failed to follow the exact same steps that lead to your situation. If you can also share any additional information that helps reproduce this it will be great.


Thanks for your answer. I rewrite my API in order to use t_id key. It’s working.

I tried at the moment on the auth0 dashboard ( > Search by lucene syntax

When i try : app_metadata.t_id:test it’s ok and I get my users but if i search for app_metadata.tenant_id:test i still get the Network error ( i guess i should get only an empty result )