Skip to main content

lance_namespace_reqwest_client/models/
match_query.rs

1/*
2 * Lance Namespace Specification
3 *
4 * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts:  The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details.  The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details. 
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MatchQuery {
16    #[serde(rename = "boost", skip_serializing_if = "Option::is_none")]
17    pub boost: Option<f32>,
18    /// Lance field path to match. Nested fields use dot-separated segments; use backtick-quoted segments for literal dots and double backticks inside quoted segments. Omit to use the query default fields.
19    #[serde(rename = "column", skip_serializing_if = "Option::is_none")]
20    pub column: Option<String>,
21    #[serde(rename = "fuzziness", skip_serializing_if = "Option::is_none")]
22    pub fuzziness: Option<i32>,
23    /// The maximum number of terms to expand for fuzzy matching. Default to 50.
24    #[serde(rename = "max_expansions", skip_serializing_if = "Option::is_none")]
25    pub max_expansions: Option<i32>,
26    /// The operator to use for combining terms. Case insensitive, supports both PascalCase and snake_case. Valid values are: - And: All terms must match. - Or: At least one term must match. 
27    #[serde(rename = "operator", skip_serializing_if = "Option::is_none")]
28    pub operator: Option<String>,
29    /// The number of beginning characters being unchanged for fuzzy matching. Default to 0.
30    #[serde(rename = "prefix_length", skip_serializing_if = "Option::is_none")]
31    pub prefix_length: Option<i32>,
32    #[serde(rename = "terms")]
33    pub terms: String,
34}
35
36impl MatchQuery {
37    pub fn new(terms: String) -> MatchQuery {
38        MatchQuery {
39            boost: None,
40            column: None,
41            fuzziness: None,
42            max_expansions: None,
43            operator: None,
44            prefix_length: None,
45            terms,
46        }
47    }
48}
49