jeho-rpls commented on code in PR #16368:
URL: https://github.com/apache/lucene/pull/16368#discussion_r3567941267
##########
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswBuilder.java:
##########
@@ -46,6 +47,14 @@ public interface HnswBuilder {
/** Set info-stream to output debugging information */
void setInfoStream(InfoStream infoStream);
+ /**
+ * Sets a check that is invoked before every node insertion during graph
construction. The check
+ * may throw an exception to abort the build promptly, e.g. {@link
+ * org.apache.lucene.index.MergePolicy.MergeAbortedException} when the merge
that triggered the
+ * build has been aborted.
+ */
+ void setAbortCheck(IORunnable abortCheck);
Review Comment:
Thanks for the suggestion.
https://github.com/apache/lucene/pull/16368/commits/2456582e3a9606fb5c792abfa90b3c04f101b7c1
: setAbortCheck now throws IllegalStateException on a second set and rejects
null. Added a test.
--
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]