HSEARCH-1191 / bis

replaces PR #530

https://hibernate.atlassian.net/browse/HSEARCH-1191