We recently updated Hibernate Search from 5.10.5 to 5.11.0/1. During the last update of our application, we altered index mappings and dropped the index. On startup, the index was created and re-indexing worked as expected. But executing any search for a tenant with a hyphen ("-") in its name returns no results.
What we're seeing is that Hibernate 5.10.5 generates the field __HSearch_TenantId like this:
while beginning from Hibernate Search 5.11.0, index definition is as follows:
The query executed by Hibernate Search looks like this
and will never return any result.
In our opinion, either the index definition of field __HSearch_TenantId has to be reverted to the original behaviour, or the generated filter query by the FullTextEntityManager should use the keyword field.
Hibernate Search 5.11.x