jimczi commented on code in PR #12529:
URL: https://github.com/apache/lucene/pull/12529#discussion_r1310859816


##########
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphBuilder.java:
##########
@@ -165,11 +134,7 @@ private HnswGraphBuilder(
    * @param vectorsToAdd the vectors for which to build a nearest neighbors 
graph. Must be an
    *     independent accessor for the vectors
    */
-  public OnHeapHnswGraph build(RandomAccessVectorValues<T> vectorsToAdd) 
throws IOException {
-    if (vectorsToAdd == this.vectors) {
-      throw new IllegalArgumentException(
-          "Vectors to build must be independent of the source of vectors 
provided to HnswGraphBuilder()");
-    }
+  public OnHeapHnswGraph build(RandomAccessVectorValues<?> vectorsToAdd) 
throws IOException {

Review Comment:
   +1, I pushed a change to modify the signature 



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to