Search engine for managing and indexing UTCP tools and providers.
The engine maintains an in-memory index of tools and providers for fast searching.
Summary
Functions
Adds a provider to the search index.
Adds a tool to the search index.
Returns a specification to start this module under a supervisor.
Clears all tools and providers from the search index.
Gets all providers from the search index.
Gets all tools from the search index.
Gets a provider by name.
Gets a tool by name.
Creates a new search engine.
Removes a provider from the search index.
Removes a tool from the search index.
Starts the search engine as a GenServer.
Gets search engine statistics.
Types
@type t() :: %ExUtcp.Search.Engine{ config: map(), providers_index: %{required(String.t()) => map()}, tools_index: %{required(String.t()) => ExUtcp.Types.tool()} }
Functions
Adds a provider to the search index.
@spec add_tool(t() | pid(), ExUtcp.Types.tool()) :: t() | :ok
Adds a tool to the search index.
Returns a specification to start this module under a supervisor.
See Supervisor.
Clears all tools and providers from the search index.
Gets all providers from the search index.
@spec get_all_tools(t() | pid()) :: [ExUtcp.Types.tool()]
Gets all tools from the search index.
Gets a provider by name.
@spec get_tool(t() | pid(), String.t()) :: ExUtcp.Types.tool() | nil
Gets a tool by name.
@spec new(keyword()) :: %ExUtcp.Search.Engine{ config: %{ enable_caching: boolean(), fuzzy_threshold: float(), max_results: integer(), semantic_threshold: float() }, providers_index: %{required(String.t()) => map()}, tools_index: %{required(String.t()) => ExUtcp.Types.tool()} }
Creates a new search engine.
Removes a provider from the search index.
Removes a tool from the search index.
Starts the search engine as a GenServer.
Gets search engine statistics.