pub struct DistributedAggregationCollector { /* private fields */ }Expand description
Collector for distributed aggregations.
The collector collects all aggregations by the underlying aggregation request.
§Purpose
AggregationCollector returns IntermediateAggregationResults and not the final
AggregationResults, so that results from different indices can be merged and then converted
into the final AggregationResults via the into_final_result() method.
Implementations§
Source§impl DistributedAggregationCollector
impl DistributedAggregationCollector
Sourcepub fn from_aggs(agg: Aggregations, limits: AggregationLimitsGuard) -> Self
pub fn from_aggs(agg: Aggregations, limits: AggregationLimitsGuard) -> Self
Create collector from aggregation request.
Aggregation fails when the limits in AggregationLimits is exceeded. (memory limit and
bucket limit)
Trait Implementations§
Source§impl Collector for DistributedAggregationCollector
impl Collector for DistributedAggregationCollector
Source§type Fruit = IntermediateAggregationResults
type Fruit = IntermediateAggregationResults
Fruit is the type for the result of our collection.
e.g. usize for the Count collector.Source§type Child = AggregationSegmentCollector
type Child = AggregationSegmentCollector
Type of the
SegmentCollector associated with this collector.Source§fn for_segment(
&self,
segment_local_id: SegmentOrdinal,
reader: &SegmentReader,
) -> Result<Self::Child>
fn for_segment( &self, segment_local_id: SegmentOrdinal, reader: &SegmentReader, ) -> Result<Self::Child>
set_segment is called before beginning to enumerate
on this segment.Source§fn requires_scoring(&self) -> bool
fn requires_scoring(&self) -> bool
Returns true iff the collector requires to compute scores for documents.
Source§fn merge_fruits(
&self,
segment_fruits: Vec<<Self::Child as SegmentCollector>::Fruit>,
) -> Result<Self::Fruit>
fn merge_fruits( &self, segment_fruits: Vec<<Self::Child as SegmentCollector>::Fruit>, ) -> Result<Self::Fruit>
Combines the fruit associated with the collection of each segments
into one fruit.
Source§fn collect_segment(
&self,
weight: &dyn Weight,
segment_ord: u32,
reader: &SegmentReader,
) -> Result<<Self::Child as SegmentCollector>::Fruit>
fn collect_segment( &self, weight: &dyn Weight, segment_ord: u32, reader: &SegmentReader, ) -> Result<<Self::Child as SegmentCollector>::Fruit>
Created a segment collector and
Auto Trait Implementations§
impl Freeze for DistributedAggregationCollector
impl RefUnwindSafe for DistributedAggregationCollector
impl Send for DistributedAggregationCollector
impl Sync for DistributedAggregationCollector
impl Unpin for DistributedAggregationCollector
impl UnsafeUnpin for DistributedAggregationCollector
impl UnwindSafe for DistributedAggregationCollector
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more