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
Copyright (c) 2020 MarkLogic Corporation Documentation generated by JSDoc 4.0.0 on 2025-08-17T20:28:56-07:00 using the DocStrap template.