private Group selectGroup(SearchGroups cluster) {
        if ( ! groups.isEmpty()) {
            List<Integer> potentialGroups = new ArrayList<>();
            for (Selection groupSelection : groups) {
                for (int group = groupSelection.from; group < groupSelection.to; group++) {
                    potentialGroups.add(group);
                }
            }
            return selectRandomGroupWithSufficientCoverage(cluster, potentialGroups);
        }

        // pick any working group
        return selectRandomGroupWithSufficientCoverage(cluster, new ArrayList<>(cluster.keys()));
    }
A subset of nodes and groups to which a query should be sent.
See https://docs.vespa.ai/en/reference/query-api-reference.html#model.searchpath

@author ollivir
container-search/src/main/java/com/yahoo/search/dispatch/SearchPath.java