private static String parseNodeRange(String nodes, List<Selection> into) {
        Matcher m = NODE_RANGE.matcher(nodes);
        if (m.find()) {
            String ret = nodes.substring(m.end());
            int start = Integer.parseInt(m.group(1));
            int end = Integer.parseInt(m.group(2));
            if (start > end) {
                throw new InvalidSearchPathException("Invalid range");
            }
            into.add(new Selection(start, end));
            return ret;
        } else {
            throw new InvalidSearchPathException("Invalid range expression");
        }
    }
Parses a search path and select nodes from the given cluster based on it.

@param searchPath unparsed search path expression (see: model.searchPath in Search API reference)
@param cluster the search cluster from which nodes are selected
@throws InvalidSearchPathException if the searchPath is malformed
@return list of nodes chosen with the search path, or an empty list in which
        case some other node selection logic should be used
container-search/src/main/java/com/yahoo/search/dispatch/SearchPath.java