Indices API: Fix wrong search stats groups

This provides a fix to issue #7644.
if this new constructor is only used in the same class we can reduce its visibility perhaps?