These operations allow you to insert vectors into Helix.

AddN

Create new nodes in your graph.

AddV<Type>
AddV<Type>(vector, {properties})

Example:

In schema.hx:

V::Document {
    content: String
    created_at: I64
}

In query.hx:

QUERY InsertVector (vector: [F64], content: String, created_at: I64) =>
    // Create an empty user node
    basic_user <- AddV<Document>(vector)
    // You could also write it like this with properties
    AddV<Document>(vector, { content: content, created_at: created_at })
    RETURN basic_user

Note: Currently, we only support using an array of F64 values to represent the vector. We will be adding support for different types such as F32, binary vectors and more in the very near future. Please reach out to us if you need a different vector type.