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};

/// HighlightFieldOption : Options for controlling the behavior of highlighting on a per-field basis
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HighlightFieldOption {
    /// Maximum size of the text fragments in highlighted snippets per field
    #[serde(rename = "fragment_size", skip_serializing_if = "Option::is_none")]
    pub fragment_size: Option<i32>,
    /// Maximum size of snippets per field
    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
    pub limit: Option<i32>,
    /// Maximum number of snippets per field
    #[serde(rename = "limit_snippets", skip_serializing_if = "Option::is_none")]
    pub limit_snippets: Option<i32>,
    /// Maximum number of words per field
    #[serde(rename = "limit_words", skip_serializing_if = "Option::is_none")]
    pub limit_words: Option<i32>,
    /// Total number of highlighted fragments per field
    #[serde(rename = "number_of_fragments", skip_serializing_if = "Option::is_none")]
    pub number_of_fragments: Option<i32>,
}

impl HighlightFieldOption {
    /// Options for controlling the behavior of highlighting on a per-field basis
    pub fn new() -> HighlightFieldOption {
        HighlightFieldOption {
            fragment_size: None,
            limit: None,
            limit_snippets: None,
            limit_words: None,
            number_of_fragments: None,
        }
    }
}