#[non_exhaustive]pub struct RelevanceScoreSpec {
pub return_relevance_score: bool,
/* private fields */
}Available on crate features
assistant-service or conversational-search-service or search-service or serving-config-service only.Expand description
The specification for returning the document relevance score.
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.return_relevance_score: boolOptional. Whether to return the relevance score for search results. The higher the score, the more relevant the document is to the query.
Implementations§
Source§impl RelevanceScoreSpec
impl RelevanceScoreSpec
pub fn new() -> Self
Sourcepub fn set_return_relevance_score<T: Into<bool>>(self, v: T) -> Self
pub fn set_return_relevance_score<T: Into<bool>>(self, v: T) -> Self
Sets the value of return_relevance_score.
§Example
ⓘ
let x = RelevanceScoreSpec::new().set_return_relevance_score(true);Trait Implementations§
Source§impl Clone for RelevanceScoreSpec
impl Clone for RelevanceScoreSpec
Source§fn clone(&self) -> RelevanceScoreSpec
fn clone(&self) -> RelevanceScoreSpec
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 RelevanceScoreSpec
impl Debug for RelevanceScoreSpec
Source§impl Default for RelevanceScoreSpec
impl Default for RelevanceScoreSpec
Source§fn default() -> RelevanceScoreSpec
fn default() -> RelevanceScoreSpec
Returns the “default value” for a type. Read more
Source§impl Message for RelevanceScoreSpec
impl Message for RelevanceScoreSpec
Source§impl PartialEq for RelevanceScoreSpec
impl PartialEq for RelevanceScoreSpec
impl StructuralPartialEq for RelevanceScoreSpec
Auto Trait Implementations§
impl Freeze for RelevanceScoreSpec
impl RefUnwindSafe for RelevanceScoreSpec
impl Send for RelevanceScoreSpec
impl Sync for RelevanceScoreSpec
impl Unpin for RelevanceScoreSpec
impl UnwindSafe for RelevanceScoreSpec
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