mayya-sharipova commented on a change in pull request #287:
URL: https://github.com/apache/lucene/pull/287#discussion_r705570925
##########
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:
@jtibshirani I was not happy with `DocIdSetIterator` as well. We can
use Java's `Iterator<Integer>`, but this would require boxing/unboxing between
primitives and Integer objects. Or create another class?
I guess may be for now keep `DocIdSetIterator`, and later can think for
something better (I can add TODO for it). WDYT?
--
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]