Derived ETS table names. Public for tests and tooling.
Full-text recall over raw conversation history.
Distinct from semantic memory (Raxol.Agent.Memory.Store.Ets, which recalls
curated Records), this is an inverted index over Raxol.Agent.Conversation
item text. It answers "what did we say about X earlier" by returning the RAW
matching items, not summaries.
Items are tokenized with Raxol.Agent.Memory.Record.tokenize/1 (the same
tokenizer the semantic store uses) and ranked with the same length-normalized
BM25-lite scoring. The index is fed either explicitly with index/2, or by
attach/3, which subscribes to a Raxol.Agent.Conversation.Log and indexes
its snapshot plus every appended item.
Tables (derived from the registered name)
- primary
:set{ {conversation_id, seq}, %{item, len} } Tok:bag{token, {conversation_id, seq}}-- inverted indexDF:set{token, doc_freq}plus{:__N__, doc_count}and{:__DL__, total_doc_len}for idf and average document length
Summary
Functions
Subscribe to a Conversation.Log and index its snapshot plus every appended
item for conversation_id.
Returns a specification to start this module under a supervisor.
Remove every indexed item.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Index a list of conversation items (each needs conversation_id, seq, type, data).
Derived ETS table names. Public for tests and tooling.
Full-text search over indexed items, returning the raw matching items ranked
by relevance. Options: :limit (default 10), :conversation_id to scope to
one conversation.
Functions
@spec attach(GenServer.server(), GenServer.server(), binary()) :: :ok
Subscribe to a Conversation.Log and index its snapshot plus every appended
item for conversation_id.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec clear(GenServer.server()) :: :ok
Remove every indexed item.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
@spec index(GenServer.server(), [map()]) :: :ok
Index a list of conversation items (each needs conversation_id, seq, type, data).
@spec search(GenServer.server(), String.t(), keyword()) :: [map()]
Full-text search over indexed items, returning the raw matching items ranked
by relevance. Options: :limit (default 10), :conversation_id to scope to
one conversation.
@spec start_link(keyword()) :: GenServer.on_start()