You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "benwtrent (via GitHub)" <gi...@apache.org> on 2023/06/12 13:12:28 UTC

[GitHub] [lucene] benwtrent commented on pull request #12281: Add checks in KNNVectorField / KNNVectorQuery to only allow non-null, non-empty and finite vectors

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

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


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