-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Use Case
Use $vectorSearch with numbers that happen to be round integer numbers.
JavaScript numbers are all doubles and the driver (understandably) tries to send integers where possible given that when users insert 1, 2, 3, etc they probably meant integers. In most cases the server doesn't care. For $vectorSearch the server seems to be particularly finicky and errors out.
Mongosh, Compass and every user's script or app that uses the node driver to perform $vectorSearch could cast the numbers to Double before passing it to the driver OR the driver could cast them before passing it to the server OR the server could relax their requirement a bit and just deal with integers.
User Impact
- No idea, but 0 and 1 are probably pretty common numbers.
- is depended on by
-
COMPASS-7769 Customer getting different results from mongosh in compass than from driver
- Closed
- related to
-
SERVER-85751 Remove $vectorSearch field validations
- Closed