vec.base64Decode( base64-vector as String ) as vec.vector
Returns a vector value by decoding the base64 encoded string input.
Parameters | |
---|---|
base64-vector | The base64 binary encoded string vector to decode. |
vec.base64Decode('FYT6NiFJhGw=AwAAAA==AAAAAA==w/VIQB+Fyz+amSlA') => "[ 3.14, 1.59, 2.65 ]" // String representation of the decoded vector value
const base64 = vec.base64Encode(vec.vector(xdmp.toJSON(fn.doc('pronethalol.json')).xpath('/data/array-node{embedding}'))) vec.base64Decode(base64) => The vector value at array node 'embedding' in document 'pronethalol.json'.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.