pub trait KnowledgeIndexSearch: Send + Sync {
// Required method
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: i64,
index_ids: &'life1 [String],
query: &'life2 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeIndexCitation>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Server-implemented hybrid retrieval over an org’s bound Knowledge Indexes.
Carried on ToolContext so the search_index agent tool can reach the
server-side embedding + vector-store machinery without everruns-core
depending on server types (mirrors PlatformStore / UserConnectionResolver).
Required Methods§
Sourcefn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: i64,
index_ids: &'life1 [String],
query: &'life2 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeIndexCitation>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: i64,
index_ids: &'life1 [String],
query: &'life2 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeIndexCitation>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Embed query, run hybrid retrieval against each bound index’s
vector-store namespace, and return up to top_k citations ordered by
score (descending).
index_ids are the kidx_ public ids bound in the capability config.
Ids that are missing, cross-org, archived, or deleted are silently
skipped — no existence leak.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".