Jido.Action.Catalog.Hit (Jido Action v2.3.0)

View Source

Ranked search hit returned from an action catalog query.

Summary

Functions

Builds a catalog hit.

Same as new/1, but raises on error.

Returns the Zoi schema used to validate catalog hits.

Types

t()

@type t() :: %Jido.Action.Catalog.Hit{
  entry: any(),
  matches: map(),
  reason: nil | binary(),
  score: float()
}

Functions

new(attrs)

@spec new(map() | keyword()) :: {:ok, t()} | {:error, Exception.t()}

Builds a catalog hit.

new!(attrs)

@spec new!(map() | keyword()) :: t() | no_return()

Same as new/1, but raises on error.

schema()

@spec schema() :: term()

Returns the Zoi schema used to validate catalog hits.