manticore_openapi/models/
highlight_field.rs

1/*
2 * Manticore Search Client
3 *
4 * Сlient for Manticore Search. 
5 *
6 * The version of the OpenAPI document: 3.3.1
7 * Contact: info@manticoresearch.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// HighlightField : Query Highlight field with options set
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct HighlightField {
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
20    pub limit: Option<i32>,
21    #[serde(rename = "limit_words", skip_serializing_if = "Option::is_none")]
22    pub limit_words: Option<i32>,
23    #[serde(rename = "limit_snippets", skip_serializing_if = "Option::is_none")]
24    pub limit_snippets: Option<i32>,
25}
26
27impl HighlightField {
28    /// Query Highlight field with options set
29    pub fn new(name: String) -> HighlightField {
30        HighlightField {
31            name,
32            limit: None,
33            limit_words: None,
34            limit_snippets: None,
35        }
36    }
37}
38