benwtrent commented on code in PR #12480:
URL: https://github.com/apache/lucene/pull/12480#discussion_r1281007489


##########
lucene/core/src/java/org/apache/lucene/util/hnsw/NeighborArray.java:
##########
@@ -31,20 +33,21 @@
 public class NeighborArray {
   private final boolean scoresDescOrder;
   private int size;
-
   float[] score;
   int[] node;
   private int sortedNodeSize;
+  private HashMap<Integer, ScoringFunction> scoringContext;
 
   public NeighborArray(int maxSize, boolean descOrder) {
     node = new int[maxSize];
     score = new float[maxSize];
     this.scoresDescOrder = descOrder;
+    scoringContext = new HashMap<>();

Review Comment:
   @zhaih yes! you are correct. Just have an array of `maxSize` works and 
`null` means there is no scoring function.



-- 
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