use crate::common;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StandardAnalyzer {
#[serde(rename = "stopwords", default, skip_serializing_if = "Option::is_none")]
pub stopwords: Option<common::analysis::StopWords>,
#[serde(rename = "type")]
pub r#type: String,
#[serde(rename = "max_token_length", default, skip_serializing_if = "Option::is_none")]
pub max_token_length: Option<u32>,
}
impl StandardAnalyzer {
pub fn new(r#type: String) -> StandardAnalyzer {
StandardAnalyzer {
stopwords: None,
r#type,
max_token_length: None,
}
}
}