pub struct SearchPipeline { /* private fields */ }Expand description
Unified search pipeline that orchestrates all RAG components
Implementations§
Source§impl SearchPipeline
impl SearchPipeline
Sourcepub async fn from_config(config: SearchConfig) -> Result<Self>
pub async fn from_config(config: SearchConfig) -> Result<Self>
Create a new search pipeline from configuration
Sourcepub async fn default_pipeline() -> Result<Self>
pub async fn default_pipeline() -> Result<Self>
Create a pipeline with default configuration (FastEmbed, InMemory)
Sourcepub async fn index_documents(
&self,
documents: Vec<IndexDocument>,
) -> Result<PipelineIndexStats>
pub async fn index_documents( &self, documents: Vec<IndexDocument>, ) -> Result<PipelineIndexStats>
Index documents into the pipeline
This embeds the documents and stores them in both the vector store and BM25 index (if hybrid search is enabled).
Sourcepub async fn search_with_filter(
&self,
query: &str,
filter: Filter,
top_k: usize,
) -> Result<Vec<PipelineSearchResult>>
pub async fn search_with_filter( &self, query: &str, filter: Filter, top_k: usize, ) -> Result<Vec<PipelineSearchResult>>
Search with metadata filtering
Sourcepub async fn health_check(&self) -> PipelineHealth
pub async fn health_check(&self) -> PipelineHealth
Check health of all pipeline components
Sourcepub async fn document_count(&self) -> Result<usize>
pub async fn document_count(&self) -> Result<usize>
Get the number of indexed documents
Sourcepub fn config(&self) -> &SearchConfig
pub fn config(&self) -> &SearchConfig
Get the configuration
Sourcepub fn embedding_info(&self) -> (&str, &str, usize)
pub fn embedding_info(&self) -> (&str, &str, usize)
Get the embedding provider info
Sourcepub fn add_known_skill(&mut self, skill_name: &str)
pub fn add_known_skill(&mut self, skill_name: &str)
Add known skills to the query processor for better understanding
Sourcepub fn add_known_tool(&mut self, tool_name: &str)
pub fn add_known_tool(&mut self, tool_name: &str)
Add known tools to the query processor
Sourcepub fn add_known_skills(
&mut self,
skills: impl IntoIterator<Item = impl Into<String>>,
)
pub fn add_known_skills( &mut self, skills: impl IntoIterator<Item = impl Into<String>>, )
Add multiple known skills at once
Sourcepub fn add_known_tools(
&mut self,
tools: impl IntoIterator<Item = impl Into<String>>,
)
pub fn add_known_tools( &mut self, tools: impl IntoIterator<Item = impl Into<String>>, )
Add multiple known tools at once
Sourcepub fn process_query(&self, query: &str) -> ProcessedQuery
pub fn process_query(&self, query: &str) -> ProcessedQuery
Process a query without searching (for debugging)
Auto Trait Implementations§
impl Freeze for SearchPipeline
impl !RefUnwindSafe for SearchPipeline
impl Send for SearchPipeline
impl Sync for SearchPipeline
impl Unpin for SearchPipeline
impl !UnwindSafe for SearchPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more