pub struct QueryExecutor {
store: Arc<dyn VectorStore>,
embedder: Arc<dyn Embedder>,
parser: QueryParser,
hybrid: bool,
}Expand description
Query executor.
Fields§
§store: Arc<dyn VectorStore>Vector store
embedder: Arc<dyn Embedder>Embedder for query embedding
parser: QueryParserQuery parser
hybrid: boolWhether to use hybrid search
Implementations§
Source§impl QueryExecutor
impl QueryExecutor
Sourcepub fn new(
store: Arc<dyn VectorStore>,
embedder: Arc<dyn Embedder>,
default_limit: usize,
hybrid: bool,
) -> Self
pub fn new( store: Arc<dyn VectorStore>, embedder: Arc<dyn Embedder>, default_limit: usize, hybrid: bool, ) -> Self
Create a new query executor.
Sourcepub async fn execute(&self, query_str: &str) -> Result<Vec<SearchResult>, Error>
pub async fn execute(&self, query_str: &str) -> Result<Vec<SearchResult>, Error>
Execute a query string.
Sourcepub async fn execute_parsed(
&self,
parsed: ParsedQuery,
) -> Result<Vec<SearchResult>, Error>
pub async fn execute_parsed( &self, parsed: ParsedQuery, ) -> Result<Vec<SearchResult>, Error>
Execute with a pre-parsed query.
Auto Trait Implementations§
impl Freeze for QueryExecutor
impl !RefUnwindSafe for QueryExecutor
impl Send for QueryExecutor
impl Sync for QueryExecutor
impl Unpin for QueryExecutor
impl !UnwindSafe for QueryExecutor
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