MongoDB / Atlas Vector Search¶
hms-import mongodb --uri "$MONGODB_URI" --db app --collection memories --vector-field embedding --text-field text
- Reads documents with
find().sort(_id).limit(page)and_id > last, so it is resumable (the cursor encodes ObjectId, string or integer_id). Other_idtypes are rejected with a reason. - Atlas Vector Search indexes are not needed or queried: the importer only reads the stored vector field (array or BSON vector).
--filtertakes a JSON query,--metadata-fieldslimits metadata,--namespace-field,--created-field,--updated-fieldmap those fields. ObjectId and other BSON scalars become strings; non-finite floats are kept as strings and counted. - URI (
mongodb+srv://supported) from--urior$MONGODB_URI; the embedded password is registered as a secret and redacted everywhere.
Verification: MOCK. No mongod is available; the tests use an in-process fake of the exact find/sort/limit/count_documents surface used. pymongo against a real server and Atlas itself are unverified.