jtibshirani commented on a change in pull request #287:
URL: https://github.com/apache/lucene/pull/287#discussion_r705530357
##########
File path: lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraph.java
##########
@@ -334,4 +324,43 @@ public int maxLevel() {
public int entryNode() {
return entryNode;
}
+
+ /**
+ * Get all nodes on a given level as node 0th ordinals
+ *
+ * @param level level for which to get all nodes
+ * @return an iterator over nodes where {@code nextDoc} returns a next node
+ */
+ public DocIdSetIterator getAllNodesOnLevel(int level) {
Review comment:
Is `DocIdSetIterator` the right choice? I've only seen us use this when
the output is really doc IDs. From searching through the repo, I didn't see a
common alternative though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]