if(node.isLeaf()) {
LeafEntry entry = (LeafEntry) node.getEntry(i);
result.add(new GenericDistanceResultPair<D>(distance, entry.getDBID()));
}
else {
DirectoryEntry entry = (DirectoryEntry) node.getEntry(i);
pq.add(new GenericDistanceSearchCandidate<D>(distance, entry.getEntryID()));
}
}
}
}