trieve_client/models/
search_method.rs1use crate::models;
12
13#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum SearchMethod {
16 #[serde(rename = "fulltext")]
17 Fulltext,
18 #[serde(rename = "semantic")]
19 Semantic,
20 #[serde(rename = "hybrid")]
21 Hybrid,
22 #[serde(rename = "bm25")]
23 Bm25,
24
25}
26
27impl ToString for SearchMethod {
28 fn to_string(&self) -> String {
29 match self {
30 Self::Fulltext => String::from("fulltext"),
31 Self::Semantic => String::from("semantic"),
32 Self::Hybrid => String::from("hybrid"),
33 Self::Bm25 => String::from("bm25"),
34 }
35 }
36}
37
38impl Default for SearchMethod {
39 fn default() -> SearchMethod {
40 Self::Fulltext
41 }
42}
43