backend improvements

Some love for the backend engine:
- https://hibernate.atlassian.net/browse/HSEARCH-1389
- https://hibernate.atlassian.net/browse/HSEARCH-1390