Struct google_api_proto::google::cloud::discoveryengine::v1::answer_query_request::search_spec::SearchParams
source · pub struct SearchParams {
pub max_return_results: i32,
pub filter: String,
pub boost_spec: Option<BoostSpec>,
pub order_by: String,
pub search_result_mode: i32,
pub data_store_specs: Vec<DataStoreSpec>,
}
Expand description
Search parameters.
Fields§
§max_return_results: i32
Number of search results to return. The default value is 10.
filter: String
The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.
If this field is unrecognizable, an INVALID_ARGUMENT
is returned.
Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend – this mapping is defined by the customer in their schema. For example a media customers might have a field ‘name’ in their schema. In this case the filter would look like this: filter –> name:‘ANY(“king kong”)’
For more information about filtering including syntax and filter operators, see Filter
boost_spec: Option<BoostSpec>
Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting
order_by: String
The order in which documents are returned. Documents can be ordered
by a field in an [Document][google.cloud.discoveryengine.v1.Document]
object. Leave it unset if ordered by relevance. order_by
expression
is case-sensitive. For more information on ordering, see
Ordering
If this field is unrecognizable, an INVALID_ARGUMENT
is returned.
search_result_mode: i32
Specifies the search result mode. If unspecified, the
search result mode defaults to DOCUMENTS
.
See parse and chunk
documents
data_store_specs: Vec<DataStoreSpec>
Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.
Implementations§
source§impl SearchParams
impl SearchParams
sourcepub fn search_result_mode(&self) -> SearchResultMode
pub fn search_result_mode(&self) -> SearchResultMode
Returns the enum value of search_result_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_search_result_mode(&mut self, value: SearchResultMode)
pub fn set_search_result_mode(&mut self, value: SearchResultMode)
Sets search_result_mode
to the provided enum value.
Trait Implementations§
source§impl Clone for SearchParams
impl Clone for SearchParams
source§fn clone(&self) -> SearchParams
fn clone(&self) -> SearchParams
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SearchParams
impl Debug for SearchParams
source§impl Default for SearchParams
impl Default for SearchParams
source§impl Message for SearchParams
impl Message for SearchParams
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for SearchParams
impl PartialEq for SearchParams
source§fn eq(&self, other: &SearchParams) -> bool
fn eq(&self, other: &SearchParams) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SearchParams
Auto Trait Implementations§
impl Freeze for SearchParams
impl RefUnwindSafe for SearchParams
impl Send for SearchParams
impl Sync for SearchParams
impl Unpin for SearchParams
impl UnwindSafe for SearchParams
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request