HSEARCH-1549

Based on top of #570