static Optional<SearchPath> fromString(String path) {
        if (path == null || path.isEmpty()) {
            return Optional.empty();
        }
        if (path.indexOf(';') >= 0) {
            return Optional.empty(); // multi-level not supported at this time
        }
        try {
            SearchPath sp = parseElement(path);
            if (sp.isEmpty()) {
                return Optional.empty();
            } else {
                return Optional.of(sp);
            }
        } catch (NumberFormatException | InvalidSearchPathException e) {
            throw new InvalidSearchPathException("Invalid search path '" + path + "'", e);
        }
    }
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