Skip to content

Commit d2d71dc

Browse files
committed
fix docs
1 parent ff7bf30 commit d2d71dc

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/aggregation/agg_req.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use super::metric::{
3939
};
4040

4141
/// The top-level aggregation request structure, which contains [`Aggregation`] and their user
42-
/// defined names. It is also used in [buckets](BucketAggregation) to define sub-aggregations.
42+
/// defined names. It is also used in buckets aggregations to define sub-aggregations.
4343
///
4444
/// The key is the user defined name of the aggregation.
4545
pub type Aggregations = HashMap<String, Aggregation>;

src/aggregation/bucket/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Module for all bucket aggregations.
22
//!
3-
//! BucketAggregations create buckets of documents
4-
//! [`BucketAggregation`](super::agg_req::BucketAggregation).
3+
//! BucketAggregations create buckets of documents.
54
//! Each bucket is associated with a rule which
65
//! determines whether or not a document in the falls into it. In other words, the buckets
76
//! effectively define document sets. Buckets are not necessarily disjunct, therefore a document can

src/aggregation/metric/percentiles.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use crate::{DocId, TantivyError};
3434
/// following example demonstrates a request for the percentiles of the "load_time"
3535
/// field:
3636
///
37-
/// ```json
37+
/// ```JSON
3838
/// {
3939
/// "percentiles": {
4040
/// "field": "load_time"
@@ -46,7 +46,7 @@ use crate::{DocId, TantivyError};
4646
/// 25, 50 (median), 75, 95, and 99). You can also customize the percentiles you want to
4747
/// calculate by providing an array of values in the "percents" parameter:
4848
///
49-
/// ```json
49+
/// ```JSON
5050
/// {
5151
/// "percentiles": {
5252
/// "field": "load_time",
@@ -90,7 +90,7 @@ fn default_as_true() -> bool {
9090
}
9191

9292
impl PercentilesAggregationReq {
93-
/// Creates a new [`PercentilesAggregation`] instance from a field name.
93+
/// Creates a new [`PercentilesAggregationReq`] instance from a field name.
9494
pub fn from_field_name(field_name: String) -> Self {
9595
PercentilesAggregationReq {
9696
field: field_name,

src/aggregation/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
//! Aggregations request and result structures de/serialize into elasticsearch compatible JSON.
2626
//!
2727
//! Notice: Intermediate aggregation results should not be de/serialized via JSON format.
28-
//! See compatibility tests here: https://github.com/PSeitz/test_serde_formats
29-
//! TLDR: use ciborium.
28+
//! Postcard is a good choice.
3029
//!
3130
//! ```verbatim
3231
//! let agg_req: Aggregations = serde_json::from_str(json_request_string).unwrap();
@@ -39,6 +38,7 @@
3938
//! ## Supported Aggregations
4039
//! - [Bucket](bucket)
4140
//! - [Histogram](bucket::HistogramAggregation)
41+
//! - [DateHistogram](bucket::DateHistogramAggregationReq)
4242
//! - [Range](bucket::RangeAggregation)
4343
//! - [Terms](bucket::TermsAggregation)
4444
//! - [Metric](metric)
@@ -48,6 +48,7 @@
4848
//! - [Max](metric::MaxAggregation)
4949
//! - [Sum](metric::SumAggregation)
5050
//! - [Count](metric::CountAggregation)
51+
//! - [Percentiles](metric::PercentilesAggregationReq)
5152
//!
5253
//! # Example
5354
//! Compute the average metric, by building [`agg_req::Aggregations`], which is built from an
@@ -121,7 +122,7 @@
121122
//! [`merge_fruits`](intermediate_agg_result::IntermediateAggregationResults::merge_fruits) method
122123
//! to merge multiple results. The merged result can then be converted into
123124
//! [`AggregationResults`](agg_result::AggregationResults) via the
124-
//! [`into_final_bucket_result`](intermediate_agg_result::IntermediateAggregationResults::into_final_bucket_result) method.
125+
//! [`into_final_result`](intermediate_agg_result::IntermediateAggregationResults::into_final_result) method.
125126
126127
mod agg_limits;
127128
pub mod agg_req;

0 commit comments

Comments
 (0)