Skip to content

Commit 7a24f3d

Browse files
committed
SQL: MATCH and QUERY documentation; one list of functions (#40494)
* Document MATCH and QUERY function predicates. * Polish the functions pages and add a list of functions to the main Functions & Operators page. (cherry picked from commit 4cec0ae)
1 parent cfa5319 commit 7a24f3d

File tree

8 files changed

+405
-114
lines changed

8 files changed

+405
-114
lines changed

docs/reference/sql/endpoints/jdbc.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ Query timeout (in seconds). That is the maximum amount of time waiting for a que
124124

125125
[float]
126126
==== Mapping
127-
`field.multi.value.leniency` (default `true`):: Whether to be lenient and return the first value for fields with multiple values (true) or throw an exception.
127+
`field.multi.value.leniency` (default `true`):: Whether to be lenient and return the first value (without any guarantees of what that
128+
will be - typically the first in natural ascending order) for fields with multiple values (true) or throw an exception.
128129

129130
[float]
130131
==== Additional

docs/reference/sql/functions/aggs.asciidoc

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
Functions for computing a _single_ result from a set of input values.
77
{es-sql} supports aggregate functions only alongside <<sql-syntax-group-by,grouping>> (implicit or explicit).
88

9-
==== General Purpose
9+
[[sql-functions-aggs-general]]
10+
[float]
11+
=== General Purpose
1012

1113
[[sql-functions-aggs-avg]]
12-
===== `AVG`
14+
==== `AVG`
1315

1416
.Synopsis:
1517
[source, sql]
@@ -33,7 +35,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggAvg]
3335
--------------------------------------------------
3436

3537
[[sql-functions-aggs-count]]
36-
===== `COUNT`
38+
==== `COUNT`
3739

3840
.Synopsis:
3941
[source, sql]
@@ -63,7 +65,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggCountStar]
6365

6466

6567
[[sql-functions-aggs-count-all]]
66-
===== `COUNT(ALL)`
68+
==== `COUNT(ALL)`
6769

6870
.Synopsis:
6971
[source, sql]
@@ -88,7 +90,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggCountAll]
8890

8991

9092
[[sql-functions-aggs-count-distinct]]
91-
===== `COUNT(DISTINCT)`
93+
==== `COUNT(DISTINCT)`
9294

9395
.Synopsis:
9496
[source, sql]
@@ -112,7 +114,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggCountDistinct]
112114
--------------------------------------------------
113115

114116
[[sql-functions-aggs-first]]
115-
===== `FIRST/FIRST_VALUE`
117+
==== `FIRST/FIRST_VALUE`
116118

117119
.Synopsis:
118120
[source, sql]
@@ -207,7 +209,7 @@ include-tagged::{sql-specs}/docs.csv-spec[firstValueWithTwoArgsAndGroupBy]
207209
the field is also <<before-enabling-fielddata,saved as a keyword>>.
208210

209211
[[sql-functions-aggs-last]]
210-
===== `LAST/LAST_VALUE`
212+
==== `LAST/LAST_VALUE`
211213

212214
.Synopsis:
213215
[source, sql]
@@ -302,7 +304,7 @@ include-tagged::{sql-specs}/docs.csv-spec[lastValueWithTwoArgsAndGroupBy]
302304
the field is also <<before-enabling-fielddata,`saved as a keyword`>>.
303305

304306
[[sql-functions-aggs-max]]
305-
===== `MAX`
307+
==== `MAX`
306308

307309
.Synopsis:
308310
[source, sql]
@@ -330,7 +332,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggMax]
330332
<<sql-functions-aggs-last>> and therefore, it cannot be used in `HAVING` clause.
331333

332334
[[sql-functions-aggs-min]]
333-
===== `MIN`
335+
==== `MIN`
334336

335337
.Synopsis:
336338
[source, sql]
@@ -358,7 +360,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggMin]
358360
<<sql-functions-aggs-first>> and therefore, it cannot be used in `HAVING` clause.
359361

360362
[[sql-functions-aggs-sum]]
361-
===== `SUM`
363+
==== `SUM`
362364

363365
.Synopsis:
364366
[source, sql]
@@ -381,10 +383,12 @@ Returns the sum of input values in the field `field_name`.
381383
include-tagged::{sql-specs}/docs.csv-spec[aggSum]
382384
--------------------------------------------------
383385

384-
==== Statistics
386+
[[sql-functions-aggs-statistics]]
387+
[float]
388+
=== Statistics
385389

386390
[[sql-functions-aggs-kurtosis]]
387-
===== `KURTOSIS`
391+
==== `KURTOSIS`
388392

389393
.Synopsis:
390394
[source, sql]
@@ -408,7 +412,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggKurtosis]
408412
--------------------------------------------------
409413

410414
[[sql-functions-aggs-percentile]]
411-
===== `PERCENTILE`
415+
==== `PERCENTILE`
412416

413417
.Synopsis:
414418
[source, sql]
@@ -434,7 +438,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggPercentile]
434438
--------------------------------------------------
435439

436440
[[sql-functions-aggs-percentile-rank]]
437-
===== `PERCENTILE_RANK`
441+
==== `PERCENTILE_RANK`
438442

439443
.Synopsis:
440444
[source, sql]
@@ -460,7 +464,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggPercentileRank]
460464
--------------------------------------------------
461465

462466
[[sql-functions-aggs-skewness]]
463-
===== `SKEWNESS`
467+
==== `SKEWNESS`
464468

465469
.Synopsis:
466470
[source, sql]
@@ -484,7 +488,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggSkewness]
484488
--------------------------------------------------
485489

486490
[[sql-functions-aggs-stddev-pop]]
487-
===== `STDDEV_POP`
491+
==== `STDDEV_POP`
488492

489493
.Synopsis:
490494
[source, sql]
@@ -508,7 +512,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggStddevPop]
508512
--------------------------------------------------
509513

510514
[[sql-functions-aggs-sum-squares]]
511-
===== `SUM_OF_SQUARES`
515+
==== `SUM_OF_SQUARES`
512516

513517
.Synopsis:
514518
[source, sql]
@@ -532,7 +536,7 @@ include-tagged::{sql-specs}/docs.csv-spec[aggSumOfSquares]
532536
--------------------------------------------------
533537

534538
[[sql-functions-aggs-var-pop]]
535-
===== `VAR_POP`
539+
==== `VAR_POP`
536540

537541
.Synopsis:
538542
[source, sql]

0 commit comments

Comments
 (0)