openserve 2.0.3

A modern, high-performance, AI-enhanced file server built in Rust
Documentation
//! Search-related data models.

use serde::{Deserialize, Serialize};

/// Search request parameters
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SearchRequest {
    /// Search query string
    pub query: String,
    /// Maximum number of results to return
    pub limit: Option<usize>,
    /// Whether to use semantic search
    pub semantic: Option<bool>,
}

/// Search result item
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SearchResult {
    /// Path of the matching file
    pub path: String,
    /// Text snippet from the file
    pub snippet: String,
    /// Relevance score
    pub score: f32,
}