rmuir commented on PR #12281: URL: https://github.com/apache/lucene/pull/12281#issuecomment-1585703710
I would move the isFinite check to KnnFloatVectorField.setVectorValue: https://github.com/apache/lucene/blob/95e2cfcc1e68a307d088a772d5d949853e7350c7/lucene/core/src/java/org/apache/lucene/document/KnnFloatVectorField.java#L152 I would fix KnnFloatVectorField ctor to actually call setVectorValue, as currently the first value passed in bypasses all checks: https://github.com/apache/lucene/blob/95e2cfcc1e68a307d088a772d5d949853e7350c7/lucene/core/src/java/org/apache/lucene/document/KnnFloatVectorField.java#L104 This way the check only happens at index-time once, and not on every comparison. -- 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]
