fix visibility (#1398)

This commit is contained in:
PSeitz
2022-06-28 15:21:39 +08:00
committed by GitHub
parent 437cd350a2
commit db1836691e
3 changed files with 4 additions and 4 deletions
+2
View File
@@ -9,6 +9,7 @@ use crate::aggregation::agg_req_with_accessor::get_aggs_with_accessor_and_valida
use crate::collector::{Collector, SegmentCollector};
use crate::{SegmentReader, TantivyError};
/// The default max bucket count, before the aggregation fails.
pub const MAX_BUCKET_COUNT: u32 = 65000;
/// Collector for aggregations.
@@ -22,6 +23,7 @@ pub struct AggregationCollector {
impl AggregationCollector {
/// Create collector from aggregation request.
///
/// Aggregation fails when the total bucket count is higher than max_bucket_count.
/// max_bucket_count will default to `MAX_BUCKET_COUNT` (65000) when unset
pub fn from_aggs(agg: Aggregations, max_bucket_count: Option<u32>) -> Self {
Self {
+1 -4
View File
@@ -36,10 +36,7 @@ pub struct IntermediateAggregationResults {
impl IntermediateAggregationResults {
/// Convert intermediate result and its aggregation request to the final result.
pub(crate) fn into_final_bucket_result(
self,
req: Aggregations,
) -> crate::Result<AggregationResults> {
pub fn into_final_bucket_result(self, req: Aggregations) -> crate::Result<AggregationResults> {
self.into_final_bucket_result_internal(&(req.into()))
}
+1
View File
@@ -166,6 +166,7 @@ use std::fmt::Display;
pub use collector::{
AggregationCollector, AggregationSegmentCollector, DistributedAggregationCollector,
MAX_BUCKET_COUNT,
};
use itertools::Itertools;
use serde::{Deserialize, Serialize};