/*
* 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};
/// AutocompleteRequest : Object containing the data for performing an autocomplete search.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AutocompleteRequest {
/// The table to perform the search on
#[serde(rename = "table")]
pub table: String,
/// The beginning of the string to autocomplete
#[serde(rename = "query")]
pub query: String,
/// Autocomplete options - layouts: A comma-separated string of keyboard layout codes to validate and check for spell correction. Available options - us, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be. By default, all are enabled. - fuzziness: (0,1 or 2) Maximum Levenshtein distance for finding typos. Set to 0 to disable fuzzy matching. Default is 2 - prepend: true/false If true, adds an asterisk before the last word for prefix expansion (e.g., *word ) - append: true/false If true, adds an asterisk after the last word for prefix expansion (e.g., word* ) - expansion_len: Number of characters to expand in the last word. Default is 10.
#[serde(rename = "options", skip_serializing_if = "Option::is_none")]
pub options: Option<serde_json::Value>,
}
impl AutocompleteRequest {
/// Object containing the data for performing an autocomplete search.
pub fn new(table: String, query: String) -> AutocompleteRequest {
AutocompleteRequest {
table,
query,
options: None,
}
}
}