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://lancedb.github.io/lance-namespace/spec/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://lancedb.github.io/lance-namespace/spec/impls/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 #[serde(rename = "column")]
19 pub column: String,
20 #[serde(rename = "fuzziness", skip_serializing_if = "Option::is_none")]
21 pub fuzziness: Option<i32>,
22 /// The maximum number of terms to expand for fuzzy matching. Default to 50.
23 #[serde(rename = "max_expansions", skip_serializing_if = "Option::is_none")]
24 pub max_expansions: Option<i32>,
25 /// The operator to use for combining terms. This can be either `And` or `Or`, it's 'Or' by default. - `And`: All terms must match. - `Or`: At least one term must match.
26 #[serde(rename = "operator", skip_serializing_if = "Option::is_none")]
27 pub operator: Option<models::Operator>,
28 /// The number of beginning characters being unchanged for fuzzy matching. Default to 0.
29 #[serde(rename = "prefix_length", skip_serializing_if = "Option::is_none")]
30 pub prefix_length: Option<i32>,
31 #[serde(rename = "terms")]
32 pub terms: String,
33}
34
35impl MatchQuery {
36 pub fn new(column: String, terms: String) -> MatchQuery {
37 MatchQuery {
38 boost: None,
39 column,
40 fuzziness: None,
41 max_expansions: None,
42 operator: None,
43 prefix_length: None,
44 terms,
45 }
46 }
47}
48