benwtrent commented on PR #12281: URL: https://github.com/apache/lucene/pull/12281#issuecomment-1587319629
@uschindler I think this change (`v[i] * v[i] * v.length`) is getting complicated. It really makes me think about if we should do any complex infinite checking other than `isFinite(float)`. For example, this check would prevent vectors that may be valid for `squareDistance`. If a specific similarity has `NaN` issues, than a more complicated `isFinite` check should account for those. But, this then opens the door to how `KnnFloatVectorQuery` would even know about the similarity used, or how that could be checked at all. I would prefer us doing the simple float value validation for now and we open an issue to see if we can get a better API for checking similarity infinity checks (e.g. `squareDistance` vs `cosine`) and if we should have those at all. -- 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]
