Vector
A dense array of numeric values stored in a binary storage efficient for storage and retrieval.
Vectors are effectively used to represent data in artificial intelligence, machine learning, semantic search, computer vision, and natural language processing applications.
All values within the vector must be of the same type.
Comparison with BSON arrays
BSON arrays are serialized as objects, where the keys are integers (but still encoded as UTF8 strings). Arrays have a minimum overhead of 3 bytes per stored element.
Vectors are serialized contiguously, so there is no overhead per element.
However, arrays and vectors are not interchangeable. Most MongoDB operators expect one or the other, but will not work with both.
External resources
Inheritors
Types
Properties
The number of bits in the final byte of raw that are to be ignored.
The raw data stored in this vector.
The type of the elements in the vector (called dtype in the specification).
Functions
Converts this Vector into a ByteArray that fits into the content of BsonType.BinaryData.