[WIP] In group sorter (MongoDB support)

| Q                   | A
| ------------------- | ---
| Bug fix?            |
| New feature?        |
| BC breaks?          |
| Tests pass?         |
| Scenarios pass?     |
| Checkstyle issues?  |
| Changelog updated?  |
| Fixed tickets       |
| Doc PR              |