use crate::models;
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SearchMethod {
#[serde(rename = "fulltext")]
Fulltext,
#[serde(rename = "semantic")]
Semantic,
#[serde(rename = "hybrid")]
Hybrid,
#[serde(rename = "bm25")]
Bm25,
}
impl ToString for SearchMethod {
fn to_string(&self) -> String {
match self {
Self::Fulltext => String::from("fulltext"),
Self::Semantic => String::from("semantic"),
Self::Hybrid => String::from("hybrid"),
Self::Bm25 => String::from("bm25"),
}
}
}
impl Default for SearchMethod {
fn default() -> SearchMethod {
Self::Fulltext
}
}