pub struct SearchQuery {
pub query: String,
pub artifact_types: Option<Vec<ArtifactType>>,
pub min_similarity: f32,
pub limit: usize,
pub tags: Option<Vec<String>>,
}Expand description
Search query parameters
Fields§
§query: StringSearch query text
artifact_types: Option<Vec<ArtifactType>>Filter by artifact types
min_similarity: f32Minimum similarity threshold (0-1)
limit: usizeMaximum results to return
Filter by tags in metadata
Implementations§
Source§impl SearchQuery
impl SearchQuery
Sourcepub fn with_types(self, types: Vec<ArtifactType>) -> Self
pub fn with_types(self, types: Vec<ArtifactType>) -> Self
Filter by artifact types
Sourcepub fn with_min_similarity(self, threshold: f32) -> Self
pub fn with_min_similarity(self, threshold: f32) -> Self
Set minimum similarity
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set result limit
Trait Implementations§
Source§impl Clone for SearchQuery
impl Clone for SearchQuery
Source§fn clone(&self) -> SearchQuery
fn clone(&self) -> SearchQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchQuery
impl Debug for SearchQuery
Source§impl Default for SearchQuery
impl Default for SearchQuery
Source§impl<'de> Deserialize<'de> for SearchQuery
impl<'de> Deserialize<'de> for SearchQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SearchQuery
impl RefUnwindSafe for SearchQuery
impl Send for SearchQuery
impl Sync for SearchQuery
impl Unpin for SearchQuery
impl UnsafeUnpin for SearchQuery
impl UnwindSafe for SearchQuery
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