Loading TOC...

MarkLogic 12 EA 1 Product Documentation
vec.base64Decode

vec.base64Decode(
   base64-vector as String
) as vec.vector

Summary

Returns a vector value by decoding the base64 encoded string input.

Parameters
base64-vector The base64 binary encoded string vector to decode.

See Also

Example

  vec.base64Decode('FYT6NiFJhGw=AwAAAA==AAAAAA==w/VIQB+Fyz+amSlA')

  => "[ 3.14, 1.59, 2.65 ]" // String representation of the decoded vector value

Example

  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 iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.