manticoresearch 2.0.0

Сlient for Manticore Search.
Documentation
/*
 * Manticore Search Client
 *
 * Сlient for Manticore Search. 
 *
 * The version of the OpenAPI document: 5.0.0
 * Contact: info@manticoresearch.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Match : Filter helper object defining a match keyword and match options
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Match {
    #[serde(rename = "query")]
    pub query: String,
    #[serde(rename = "operator", skip_serializing_if = "Option::is_none")]
    pub operator: Option<Operator>,
    #[serde(rename = "boost", skip_serializing_if = "Option::is_none")]
    pub boost: Option<f64>,
}

impl Match {
    /// Filter helper object defining a match keyword and match options
    pub fn new(query: String) -> Match {
        Match {
            query,
            operator: None,
            boost: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Operator {
    #[serde(rename = "or")]
    Or,
    #[serde(rename = "and")]
    And,
}

impl Default for Operator {
    fn default() -> Operator {
        Self::Or
    }
}