Tenant IDs containing underscores are not supported with ES

Description

See DocumentIdHelper: if the tenant ID contains an underscore, it is likely that only the part before the underscore will be interpreted as the tenant ID, the remaining part being interpreted as the beginning of the entity ID.

We should escape underscore in the tenant ID, and take these escape into account when extracting back the entity ID.
Also, we should check whether there are other places where we should take this escaping into account (most notably queries).

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

Priority

Major
Configure