#[non_exhaustive]pub struct DataStoreSpec {
pub data_store: String,
pub filter: String,
pub boost_spec: Option<BoostSpec>,
pub custom_search_operators: String,
/* private fields */
}assistant-service or conversational-search-service or search-service or serving-config-service only.Expand description
A struct to define data stores to filter on in a search call and
configurations for those data stores. Otherwise, an INVALID_ARGUMENT
error is returned.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data_store: StringRequired. Full resource name of
DataStore, such as
projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}.
filter: StringOptional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see Filtering
boost_spec: Option<BoostSpec>Optional. Boost specification to boost certain documents. For more information on boosting, see Boosting
custom_search_operators: StringOptional. Custom search operators which if specified will be used to filter results from workspace data stores. For more information on custom search operators, see SearchOperators.
Implementations§
Source§impl DataStoreSpec
impl DataStoreSpec
pub fn new() -> Self
Sourcepub fn set_data_store<T: Into<String>>(self, v: T) -> Self
pub fn set_data_store<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_filter<T: Into<String>>(self, v: T) -> Self
pub fn set_filter<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_boost_spec<T>(self, v: T) -> Self
pub fn set_boost_spec<T>(self, v: T) -> Self
Sets the value of boost_spec.
§Example
use google_cloud_discoveryengine_v1::model::search_request::BoostSpec;
let x = DataStoreSpec::new().set_boost_spec(BoostSpec::default()/* use setters */);Sourcepub fn set_or_clear_boost_spec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_boost_spec<T>(self, v: Option<T>) -> Self
Sets or clears the value of boost_spec.
§Example
use google_cloud_discoveryengine_v1::model::search_request::BoostSpec;
let x = DataStoreSpec::new().set_or_clear_boost_spec(Some(BoostSpec::default()/* use setters */));
let x = DataStoreSpec::new().set_or_clear_boost_spec(None::<BoostSpec>);Sourcepub fn set_custom_search_operators<T: Into<String>>(self, v: T) -> Self
pub fn set_custom_search_operators<T: Into<String>>(self, v: T) -> Self
Sets the value of custom_search_operators.
§Example
let x = DataStoreSpec::new().set_custom_search_operators("example");Trait Implementations§
Source§impl Clone for DataStoreSpec
impl Clone for DataStoreSpec
Source§fn clone(&self) -> DataStoreSpec
fn clone(&self) -> DataStoreSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more