Skip to content

Commit db18366

Browse files
authored
fix visibility (#1398)
1 parent 437cd35 commit db18366

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/aggregation/collector.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::aggregation::agg_req_with_accessor::get_aggs_with_accessor_and_valida
99
use crate::collector::{Collector, SegmentCollector};
1010
use crate::{SegmentReader, TantivyError};
1111

12+
/// The default max bucket count, before the aggregation fails.
1213
pub const MAX_BUCKET_COUNT: u32 = 65000;
1314

1415
/// Collector for aggregations.
@@ -22,6 +23,7 @@ pub struct AggregationCollector {
2223
impl AggregationCollector {
2324
/// Create collector from aggregation request.
2425
///
26+
/// Aggregation fails when the total bucket count is higher than max_bucket_count.
2527
/// max_bucket_count will default to `MAX_BUCKET_COUNT` (65000) when unset
2628
pub fn from_aggs(agg: Aggregations, max_bucket_count: Option<u32>) -> Self {
2729
Self {

src/aggregation/intermediate_agg_result.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ pub struct IntermediateAggregationResults {
3636

3737
impl IntermediateAggregationResults {
3838
/// Convert intermediate result and its aggregation request to the final result.
39-
pub(crate) fn into_final_bucket_result(
40-
self,
41-
req: Aggregations,
42-
) -> crate::Result<AggregationResults> {
39+
pub fn into_final_bucket_result(self, req: Aggregations) -> crate::Result<AggregationResults> {
4340
self.into_final_bucket_result_internal(&(req.into()))
4441
}
4542

src/aggregation/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ use std::fmt::Display;
166166

167167
pub use collector::{
168168
AggregationCollector, AggregationSegmentCollector, DistributedAggregationCollector,
169+
MAX_BUCKET_COUNT,
169170
};
170171
use itertools::Itertools;
171172
use serde::{Deserialize, Serialize};

0 commit comments

Comments
 (0)