public NodeSequence descendantNodes( Path ancestorPath,
float score ) {
String workspaceName = getWorkspaceName(ancestorPath);
// Get an iterator over all acceptable nodes in the workspace ...
NodeCacheIterator iter = nodes(workspaceName, ancestorPath);
if (iter != null) {
if (iter.hasNext()) {
// Skip the node at our path, which is to be excluded ...
NodeKey key = iter.next();
assert ancestorPath.equals(path(workspaceName, key)) : "First node in results does not match the expected path";
}
// Finally create and add a batch for this workspace ...
return NodeSequence.withNodeKeys(iter, -1, score, workspaceName, repo);
}