Namespace: vectorUtil
vectorUtil
Provides functions to encode and decode
vectors. MarkLogic 12 or higher needed.
Methods
-
-
base64Decode(encodedVector) → {Array.<float>}
-
Converts an encoded string value to an array of vectors.
Parameters:
Name Type Description encodedVector
string an encoded string value. - Since:
-
- 3.7.0
Returns:
an array of float values.- Type
- Array.<float>
-
-
base64Encode(vector) → {string}
-
Converts an array of vector float values into an encoded string. Encoding vectors before writing them to documents in MarkLogic 12 helps reduce the amount of disk space and memory consumed by vectors.
Parameters:
Name Type Description vector
Array.<float> an array of float values - Since:
-
- 3.7.0
Returns:
an encoded string value.- Type
- string