int nbResults = 0;
// We use the RdnIndex to get all the entries from a starting point
// and below up to the number of descendant
String baseId = node.getBaseId();
ParentIdAndRdn parentIdAndRdn = db.getRdnIndex().reverseLookup( baseId );
IndexEntry<ParentIdAndRdn, String> startingPos = new IndexEntry<ParentIdAndRdn, String>();
startingPos.setKey( parentIdAndRdn );
startingPos.setId( baseId );
Cursor<IndexEntry<ParentIdAndRdn, String>> rdnCursor = new SingletonIndexCursor<ParentIdAndRdn>(
startingPos );
String parentId = parentIdAndRdn.getParentId();
Cursor<IndexEntry<String, String>> scopeCursor = new DescendantCursor( db, baseId, parentId, rdnCursor );
Set<String> candidateSet = searchResult.getCandidateSet();
// Fetch all the UUIDs if we have an index