Zvex.Query.Result (zvex v0.4.0)

Copy Markdown View Source

A single result returned by Zvex.Query.execute/2.

Fields

  • :pk — the primary key of the matched document, or nil if not available.
  • :score — the distance/similarity score (interpretation depends on the metric).
  • :doc_id — internal document identifier (only populated when Zvex.Query.include_doc_id/2 is true).
  • :fields — requested output fields as %{"name" => {type_atom, value}}, using the same typed-tuple format as Zvex.Document.

Summary

Types

t()

A single query result with score and optional field data.

Types

t()

@type t() :: %Zvex.Query.Result{
  doc_id: non_neg_integer(),
  fields: %{required(String.t()) => {atom(), term()}},
  pk: String.t() | nil,
  score: float()
}

A single query result with score and optional field data.