Skip to content

Commit 82bfbe1

Browse files
author
Adam Locke
authored
[DOCS] Adding headers in TOC for aggregation docs. (#66604)
1 parent 78690ab commit 82bfbe1

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

docs/reference/aggregations/bucket/datehistogram-aggregation.asciidoc

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ will be removed in the future.
5656
==================================
5757

5858
[[calendar_intervals]]
59-
===== Calendar intervals
59+
==== Calendar intervals
6060

6161
Calendar-aware intervals are configured with the `calendar_interval` parameter.
6262
You can specify calendar intervals using the unit name, such as `month`, or as a
@@ -173,7 +173,7 @@ POST /sales/_search?size=0
173173
// NOTCONSOLE
174174

175175
[[fixed_intervals]]
176-
===== Fixed intervals
176+
==== Fixed intervals
177177

178178
Fixed intervals are configured with the `fixed_interval` parameter.
179179

@@ -267,7 +267,7 @@ POST /sales/_search?size=0
267267
// NOTCONSOLE
268268

269269
[[datehistogram-aggregation-notes]]
270-
===== Notes
270+
==== Date histogram usage notes
271271

272272
In all cases, when the specified end time does not exist, the actual end time is
273273
the closest available time after the specified end.
@@ -282,17 +282,17 @@ As always, rigorous testing, especially around time-change events, will ensure
282282
that your time interval specification is
283283
what you intend it to be.
284284

285-
WARNING:
286-
To avoid unexpected results, all connected servers and clients must sync to a
287-
reliable network time service.
285+
WARNING: To avoid unexpected results, all connected servers and clients must
286+
sync to a reliable network time service.
288287

289-
NOTE: fractional time values are not supported, but you can address this by
288+
NOTE: Fractional time values are not supported, but you can address this by
290289
shifting to another time unit (e.g., `1.5h` could instead be specified as `90m`).
291290

292291
NOTE: You can also specify time values using abbreviations supported by
293292
<<time-units,time units>> parsing.
294293

295-
===== Keys
294+
[[datehistogram-aggregation-keys]]
295+
==== Keys
296296

297297
Internally, a date is represented as a 64 bit number representing a timestamp
298298
in milliseconds-since-the-epoch (01/01/1970 midnight UTC). These timestamps are
@@ -353,7 +353,8 @@ Response:
353353
--------------------------------------------------
354354
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
355355

356-
===== Time zone
356+
[[datehistogram-aggregation-time-zone]]
357+
==== Time zone
357358

358359
{es} stores date-times in Coordinated Universal Time (UTC). By default, all bucketing and
359360
rounding is also done in UTC. Use the `time_zone` parameter to indicate
@@ -489,7 +490,7 @@ shorter intervals, like a `fixed_interval` of `12h`, where you'll have only a 11
489490
bucket on the morning of 27 March when the DST shift happens.
490491

491492
[[search-aggregations-bucket-datehistogram-offset]]
492-
===== Offset
493+
==== Offset
493494

494495
// tag::offset-explanation[]
495496
Use the `offset` parameter to change the start value of each bucket by the
@@ -562,7 +563,8 @@ NOTE: The start `offset` of each bucket is calculated after `time_zone`
562563
adjustments have been made.
563564
// end::offset-note[]
564565

565-
===== Keyed Response
566+
[[date-histogram-keyed-response]]
567+
==== Keyed Response
566568

567569
Setting the `keyed` flag to `true` associates a unique string key with each
568570
bucket and returns the ranges as a hash rather than an array:
@@ -616,7 +618,8 @@ Response:
616618
--------------------------------------------------
617619
// TESTRESPONSE[s/\.\.\./"took": $body.took,"timed_out": false,"_shards": $body._shards,"hits": $body.hits,/]
618620

619-
===== Scripts
621+
[[date-histogram-scripts]]
622+
==== Scripts
620623

621624
As with the normal <<search-aggregations-bucket-histogram-aggregation,histogram>>,
622625
both document-level scripts and
@@ -632,6 +635,7 @@ For more information, see
632635
<<search-aggregations-bucket-histogram-aggregation-extended-bounds,`Extended Bounds`>> and
633636
<<search-aggregations-bucket-histogram-aggregation-hard-bounds,`Hard Bounds`>>.
634637

638+
[[date-histogram-missing-value]]
635639
===== Missing value
636640

637641
The `missing` parameter defines how to treat documents that are missing a value.
@@ -658,19 +662,20 @@ POST /sales/_search?size=0
658662
<1> Documents without a value in the `publish_date` field will fall into the
659663
same bucket as documents that have the value `2000-01-01`.
660664

665+
[[date-histogram-order]]
661666
===== Order
662667

663668
By default the returned buckets are sorted by their `key` ascending, but you can
664669
control the order using
665670
the `order` setting. This setting supports the same `order` functionality as
666671
<<search-aggregations-bucket-terms-aggregation-order,`Terms Aggregation`>>.
667672

673+
[[date-histogram-aggregate-scripts]]
668674
===== Using a script to aggregate by day of the week
669675

670676
When you need to aggregate the results by day of the week, use a script that
671677
returns the day of the week:
672678

673-
674679
[source,console,id=datehistogram-aggregation-script-example]
675680
--------------------------------------------------
676681
POST /sales/_search?size=0

docs/reference/aggregations/metrics/geobounds-aggregation.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ The response for the above aggregation:
8282

8383
[discrete]
8484
[role="xpack"]
85+
[[geobounds-aggregation-geo-shape]]
8586
==== Geo Bounds Aggregation on `geo_shape` fields
8687

8788
The Geo Bounds Aggregation is also supported on `geo_shape` fields.

docs/reference/aggregations/metrics/geocentroid-aggregation.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ The response for the above aggregation:
150150

151151
[discrete]
152152
[role="xpack"]
153+
[[geocentroid-aggregation-geo-shape]]
153154
==== Geo Centroid Aggregation on `geo_shape` fields
154155

155156
The centroid metric for geo-shapes is more nuanced than for points. The centroid of a specific aggregation bucket

0 commit comments

Comments
 (0)