pub struct SemanticSearchUseCase { /* private fields */ }Expand description
Use Case: Semantic Search
This use case handles semantic (vector-based) search operations.
Responsibilities:
- Validate search parameters
- Execute vector similarity search
- Optionally enrich results with full event data
- Apply filters and pagination
Implementations§
Source§impl SemanticSearchUseCase
impl SemanticSearchUseCase
pub fn new( vector_service: Arc<VectorSearchService>, event_repository: Arc<dyn EventRepository>, ) -> Self
Sourcepub async fn execute(
&self,
request: SemanticSearchUseCaseRequest,
) -> Result<SemanticSearchUseCaseResponse>
pub async fn execute( &self, request: SemanticSearchUseCaseRequest, ) -> Result<SemanticSearchUseCaseResponse>
Execute semantic search and return results
Sourcepub async fn find_similar(
&self,
event_id: Uuid,
k: usize,
tenant_id: Option<String>,
) -> Result<SemanticSearchUseCaseResponse>
pub async fn find_similar( &self, event_id: Uuid, k: usize, tenant_id: Option<String>, ) -> Result<SemanticSearchUseCaseResponse>
Find similar events to a given event
Auto Trait Implementations§
impl Freeze for SemanticSearchUseCase
impl !RefUnwindSafe for SemanticSearchUseCase
impl Send for SemanticSearchUseCase
impl Sync for SemanticSearchUseCase
impl Unpin for SemanticSearchUseCase
impl !UnwindSafe for SemanticSearchUseCase
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> 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