Zvec.Doc (zvec v0.4.0)

Copy Markdown View Source

Document struct for zvec collections.

Example

doc = Zvec.Doc.new("pk1", %{"text" => "hello", "embedding" => vec_binary})

Summary

Functions

Create a new document with primary key and field values.

Types

t()

@type t() :: %Zvec.Doc{fields: map(), pk: String.t() | nil, score: float() | nil}

Functions

new(pk, fields \\ %{})

@spec new(String.t(), map()) :: t()

Create a new document with primary key and field values.