#[non_exhaustive]pub struct TextSearch {
pub search_text: String,
pub data_field_names: Vec<String>,
pub output_fields: Option<OutputFields>,
pub top_k: Option<i32>,
pub filter: Option<Struct>,
/* private fields */
}Expand description
Defines a text search operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.search_text: StringRequired. The query text.
data_field_names: Vec<String>Required. The data field names to search.
output_fields: Option<OutputFields>Optional. The fields to return in the search results.
top_k: Option<i32>Optional. The number of results to return.
filter: Option<Struct>Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
represented as a google.protobuf.Struct.
Implementations§
Source§impl TextSearch
impl TextSearch
pub fn new() -> Self
Sourcepub fn set_search_text<T: Into<String>>(self, v: T) -> Self
pub fn set_search_text<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_data_field_names<T, V>(self, v: T) -> Self
pub fn set_data_field_names<T, V>(self, v: T) -> Self
Sets the value of data_field_names.
§Example
ⓘ
let x = TextSearch::new().set_data_field_names(["a", "b", "c"]);Sourcepub fn set_output_fields<T>(self, v: T) -> Selfwhere
T: Into<OutputFields>,
pub fn set_output_fields<T>(self, v: T) -> Selfwhere
T: Into<OutputFields>,
Sets the value of output_fields.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::OutputFields;
let x = TextSearch::new().set_output_fields(OutputFields::default()/* use setters */);Sourcepub fn set_or_clear_output_fields<T>(self, v: Option<T>) -> Selfwhere
T: Into<OutputFields>,
pub fn set_or_clear_output_fields<T>(self, v: Option<T>) -> Selfwhere
T: Into<OutputFields>,
Sets or clears the value of output_fields.
§Example
ⓘ
use google_cloud_vectorsearch_v1::model::OutputFields;
let x = TextSearch::new().set_or_clear_output_fields(Some(OutputFields::default()/* use setters */));
let x = TextSearch::new().set_or_clear_output_fields(None::<OutputFields>);Sourcepub fn set_or_clear_top_k<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_top_k<T>(self, v: Option<T>) -> Self
Sourcepub fn set_filter<T>(self, v: T) -> Self
pub fn set_filter<T>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for TextSearch
impl Clone for TextSearch
Source§fn clone(&self) -> TextSearch
fn clone(&self) -> TextSearch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextSearch
impl Debug for TextSearch
Source§impl Default for TextSearch
impl Default for TextSearch
Source§fn default() -> TextSearch
fn default() -> TextSearch
Returns the “default value” for a type. Read more
Source§impl PartialEq for TextSearch
impl PartialEq for TextSearch
impl StructuralPartialEq for TextSearch
Auto Trait Implementations§
impl Freeze for TextSearch
impl RefUnwindSafe for TextSearch
impl Send for TextSearch
impl Sync for TextSearch
impl Unpin for TextSearch
impl UnsafeUnpin for TextSearch
impl UnwindSafe for TextSearch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more