#[non_exhaustive]pub struct CrowdingSpec {
pub field: String,
pub max_count: i32,
pub mode: Mode,
/* private fields */
}assistant-service or conversational-search-service or search-service or serving-config-service only.Expand description
Specification for crowding. Crowding improves the diversity of search results by limiting the number of results that share the same field value. For example, crowding on the color field with a max_count of 3 and mode DROP_CROWDED_RESULTS will return at most 3 results with the same color across all pages.
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.field: StringThe field to use for crowding. Documents can be crowded by a field in the Document object. Crowding field is case sensitive.
max_count: i32The maximum number of documents to keep per value of the field. Once
there are at least max_count previous results which contain the same
value for the given field (according to the order specified in
order_by), later results with the same value are “crowded away”.
If not specified, the default value is 1.
mode: ModeMode to use for documents that are crowded away.
Implementations§
Trait Implementations§
Source§impl Clone for CrowdingSpec
impl Clone for CrowdingSpec
Source§fn clone(&self) -> CrowdingSpec
fn clone(&self) -> CrowdingSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more