Gralkor.Lens.Store (jido_gralkor v5.0.0)

Copy Markdown View Source

Storage capability passed to a Gralkor.Lens.Ingestion process.

The Store is already bound to an operator and resolved Lens. Additions use that Lens's ontology and scope; searches use its destination; removals use the same destination. Ingestion processes should use this capability rather than choose Graphiti partitions themselves.

Global provenance is attached by the storage adapter and does not need to be supplied by the process.

Summary

Functions

Adds an episode through the bound Lens.

Searches the bound Lens destination.

Types

t()

@type t() :: %Gralkor.Lens.Store{
  lens: Gralkor.Lens.t() | :global,
  operator_id: String.t()
}

Functions

add(store, content, source_description)

@spec add(t(), String.t(), String.t()) :: :ok | {:error, term()}

Adds an episode through the bound Lens.

search(store, query, max_results)

@spec search(t(), String.t(), pos_integer()) :: {:ok, [String.t()]} | {:error, term()}

Searches the bound Lens destination.