Note there’s a way to do this without a dedicated feature in Hibernate Search 6: https://stackoverflow.com/a/73908210/6692043
I’ll document this in https://hibernate.atlassian.net/browse/HSEARCH-4710