pub struct DiversifiedSamplerAggregation { /* private fields */ }Expand description
Like the sampler aggregation this is a filtering aggregation used to limit any sub aggregations’ processing to a sample of the top-scoring documents. The diversified_sampler aggregation adds the ability to limit the number of matches that share a common value such as an “author”.
Implementations§
source§impl DiversifiedSamplerAggregation
impl DiversifiedSamplerAggregation
sourcepub fn shard_size(self, shard_size: u64) -> Self
pub fn shard_size(self, shard_size: u64) -> Self
The shard_size parameter limits how many top-scoring documents are
collected in the sample processed on each shard. The default value is 100.
sourcepub fn max_docs_per_value(self, max_docs_per_value: u64) -> Self
pub fn max_docs_per_value(self, max_docs_per_value: u64) -> Self
The max_docs_per_value is an optional parameter and limits how many documents
are permitted per choice of de-duplicating value. The default setting is “1”.
sourcepub fn execution_hint(self, execution_hint: ExecutionHint) -> Self
pub fn execution_hint(self, execution_hint: ExecutionHint) -> Self
The optional execution_hint setting can influence the management of the values
used for de-duplication. Each option will hold up to shard_size values in memory
while performing de-duplication but the type of value held can be controlled as follows:
- hold field values directly (
map) - hold ordinals of the field as determined by the Lucene index (
global_ordinals) - hold hashes of the field values - with potential for hash collisions (
bytes_hash)
Trait Implementations§
source§impl Clone for DiversifiedSamplerAggregation
impl Clone for DiversifiedSamplerAggregation
source§fn clone(&self) -> DiversifiedSamplerAggregation
fn clone(&self) -> DiversifiedSamplerAggregation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl From<DiversifiedSamplerAggregation> for Aggregation
impl From<DiversifiedSamplerAggregation> for Aggregation
source§fn from(q: DiversifiedSamplerAggregation) -> Self
fn from(q: DiversifiedSamplerAggregation) -> Self
source§impl PartialEq for DiversifiedSamplerAggregation
impl PartialEq for DiversifiedSamplerAggregation
source§fn eq(&self, other: &DiversifiedSamplerAggregation) -> bool
fn eq(&self, other: &DiversifiedSamplerAggregation) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DiversifiedSamplerAggregation
Auto Trait Implementations§
impl Freeze for DiversifiedSamplerAggregation
impl RefUnwindSafe for DiversifiedSamplerAggregation
impl Send for DiversifiedSamplerAggregation
impl Sync for DiversifiedSamplerAggregation
impl Unpin for DiversifiedSamplerAggregation
impl UnwindSafe for DiversifiedSamplerAggregation
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)