lance_namespace_reqwest_client/models/boolean_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/// BooleanQuery : Boolean query with must, should, and must_not clauses
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BooleanQuery {
17 /// Queries that must match (AND)
18 #[serde(rename = "must")]
19 pub must: Vec<models::FtsQuery>,
20 /// Queries that must not match (NOT)
21 #[serde(rename = "must_not")]
22 pub must_not: Vec<models::FtsQuery>,
23 /// Queries that should match (OR)
24 #[serde(rename = "should")]
25 pub should: Vec<models::FtsQuery>,
26}
27
28impl BooleanQuery {
29 /// Boolean query with must, should, and must_not clauses
30 pub fn new(must: Vec<models::FtsQuery>, must_not: Vec<models::FtsQuery>, should: Vec<models::FtsQuery>) -> BooleanQuery {
31 BooleanQuery {
32 must,
33 must_not,
34 should,
35 }
36 }
37}
38