trieve_client/models/
search_method.rs

1/*
2 * Trieve API
3 *
4 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5 *
6 * The version of the OpenAPI document: 0.11.7
7 * Contact: developers@trieve.ai
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// 
14#[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