-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Triage
-
(copied to CRM)
What problem are you facing?
Floating point numbers within vector embedding being converted to integers, causing BSON type issue at query time when executing $vectorSearch.
$vectorSearch:MongoServerError: BSON field '$vectorSearch.queryVector.117' is the wrong type 'int', expected type 'double'
{{}}
Manually replacing each instance of -1, 0, or 1 with a floating point number of similar value resolves the problem, which suggests that there is some implicit type conversion happening on the node side.
What driver and relevant dependency versions are you using?
{{}}
node --version v20.5.1cat package.json { "dependencies": { "dotenv": "^16.1.3", "mongodb": "^5.7.0", "graphviz": "^0.0.9", "canvas": "^2.11.2", "@aws-sdk/client-bedrock-runtime": "^3.433.0" } }MongoDB 7.0.2 (on Atlas M10)AWS Bedrock Embeddings Model: amazon.titan-embed-text-v1
Steps to reproduce?
Execute $vectorSearch on embeddings produced from the linked embedding model.