#[non_exhaustive]pub struct QueryExpansionInfo {
pub expanded_query: bool,
pub pinned_result_count: i64,
/* private fields */
}Available on crate features
conversational-search-service or search-service only.Expand description
Information describing query expansion including whether expansion has occurred.
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.expanded_query: boolBool describing whether query expansion has occurred.
pinned_result_count: i64Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.
Implementations§
Source§impl QueryExpansionInfo
impl QueryExpansionInfo
pub fn new() -> Self
Sourcepub fn set_expanded_query<T: Into<bool>>(self, v: T) -> Self
pub fn set_expanded_query<T: Into<bool>>(self, v: T) -> Self
Sets the value of expanded_query.
§Example
ⓘ
let x = QueryExpansionInfo::new().set_expanded_query(true);Sourcepub fn set_pinned_result_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_pinned_result_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of pinned_result_count.
§Example
ⓘ
let x = QueryExpansionInfo::new().set_pinned_result_count(42);Trait Implementations§
Source§impl Clone for QueryExpansionInfo
impl Clone for QueryExpansionInfo
Source§fn clone(&self) -> QueryExpansionInfo
fn clone(&self) -> QueryExpansionInfo
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 QueryExpansionInfo
impl Debug for QueryExpansionInfo
Source§impl Default for QueryExpansionInfo
impl Default for QueryExpansionInfo
Source§fn default() -> QueryExpansionInfo
fn default() -> QueryExpansionInfo
Returns the “default value” for a type. Read more
Source§impl Message for QueryExpansionInfo
impl Message for QueryExpansionInfo
Source§impl PartialEq for QueryExpansionInfo
impl PartialEq for QueryExpansionInfo
impl StructuralPartialEq for QueryExpansionInfo
Auto Trait Implementations§
impl Freeze for QueryExpansionInfo
impl RefUnwindSafe for QueryExpansionInfo
impl Send for QueryExpansionInfo
impl Sync for QueryExpansionInfo
impl Unpin for QueryExpansionInfo
impl UnwindSafe for QueryExpansionInfo
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