elasticsearch/docs/reference/esql/functions
Nhat Nguyen 22aad7b201
Support metrics counter types in ESQL (#107877)
This commit adds support for numeric metrics counter fields in ES|QL. 
These counter types, including counter_long, counter_integer, and
counter_double, are different from their parent types. Users will have
limited interaction with these counter types, restricted to:

- Retrieving values without any processing
- Casting to their root type (e.g., to_long(a_long_counter))
- Using them in the metrics rate aggregation

These restrictions are intentional to prevent misuse. If users want to 
use them as numeric values, explicit casting to their root types is
required.
2024-04-26 12:15:48 -07:00
..
description [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
examples ESQL: Document BUCKET as a grouping function (#107864) 2024-04-25 12:38:12 -04:00
kibana Support metrics counter types in ESQL (#107877) 2024-04-26 12:15:48 -07:00
layout [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
parameters [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
signature [ES|QL] Base64 decoding and encoding functions (#107390) 2024-04-15 18:39:26 -04:00
types Support metrics counter types in ESQL (#107877) 2024-04-26 12:15:48 -07:00
aggregation-functions.asciidoc ESQL: Document BUCKET as a grouping function (#107864) 2024-04-25 12:38:12 -04:00
avg.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
binary.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
case.asciidoc [DOCS] Improve ES|QL functions reference for functions A-D (#103447) 2023-12-19 15:59:02 +01:00
cast.asciidoc ESQL: Document the cast operator (::) (#107871) 2024-04-25 10:10:59 -04:00
cidr_match.asciidoc [DOCS] Improve ES|QL functions reference for functions A-D (#103447) 2023-12-19 15:59:02 +01:00
coalesce.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
conditional-functions-and-expressions.asciidoc Add improvements to the ES|QL docs (#101195) 2023-10-23 07:45:42 -07:00
count-distinct.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
count.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
date-time-functions.asciidoc ESQL: Document BUCKET as a grouping function (#107864) 2024-04-25 12:38:12 -04:00
ends_with.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
greatest.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
grouping-functions.asciidoc ESQL: Document BUCKET as a grouping function (#107864) 2024-04-25 12:38:12 -04:00
in.asciidoc [DOCS] Examples for ES|QL DISSECT and WHERE (#102591) 2023-11-27 10:56:48 +01:00
least.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
like.asciidoc [DOCS] Examples for ES|QL DISSECT and WHERE (#102591) 2023-11-27 10:56:48 +01:00
logical.asciidoc Restructure ES|QL docs (#100806) 2023-10-17 17:36:14 +02:00
math-functions.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
max.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
median-absolute-deviation.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
median.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
min.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
mv-functions.asciidoc [ES|QL] Add mv_sort (#106095) 2024-03-13 12:04:12 -04:00
mv_avg.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_concat.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_count.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_dedupe.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_first.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_last.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_max.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_median.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_min.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_slice.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_sort.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_sum.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
mv_zip.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
now.asciidoc [DOCS] Improve ES|QL functions reference for functions E-Z (#104623) 2024-01-25 16:32:24 +01:00
operators.asciidoc ESQL: Document the cast operator (::) (#107871) 2024-04-25 10:10:59 -04:00
percentile.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
predicates.asciidoc [DOCS] Examples for ES|QL DISSECT and WHERE (#102591) 2023-11-27 10:56:48 +01:00
README.md ESQL: Generate kibana inline docs (#106782) 2024-04-09 14:19:48 -04:00
rlike.asciidoc [DOCS] Examples for ES|QL DISSECT and WHERE (#102591) 2023-11-27 10:56:48 +01:00
round.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
spatial-functions.asciidoc ESQL: Support ST_DISJOINT (#107007) 2024-04-08 12:26:26 +02:00
st_centroid_agg.asciidoc Rename ST_CENTROID to ST_CENTROID_AGG (#107226) 2024-04-10 17:56:45 +02:00
st_contains.asciidoc ESQL: Support ST_DISJOINT (#107007) 2024-04-08 12:26:26 +02:00
st_disjoint.asciidoc ESQL: Support ST_DISJOINT (#107007) 2024-04-08 12:26:26 +02:00
st_intersects.asciidoc ESQL: Support ST_DISJOINT (#107007) 2024-04-08 12:26:26 +02:00
st_within.asciidoc ESQL: Support ST_DISJOINT (#107007) 2024-04-08 12:26:26 +02:00
st_x.asciidoc ESQL: Support ST_CONTAINS and ST_WITHIN (#106503) 2024-04-02 10:31:00 +02:00
st_y.asciidoc ESQL: Support ST_CONTAINS and ST_WITHIN (#106503) 2024-04-02 10:31:00 +02:00
starts_with.asciidoc ESQL: Generate more docs (#106367) 2024-03-19 15:40:13 -04:00
string-functions.asciidoc Docs: move STARTS/ENDS_WITH under string functions in the docs (#107867) 2024-04-25 09:41:11 -04:00
sum.asciidoc [DOCS] Support for nested functions in ES|QL STATS...BY (#104788) 2024-01-30 19:29:12 +01:00
type-conversion-functions.asciidoc Docs: move base64 functions under string functions (#107866) 2024-04-25 13:57:45 +02:00
unary.asciidoc ESQL: Add type tables for operators to docs (#103206) 2023-12-11 10:51:38 -05:00
values.asciidoc ESQL: Enable VALUES agg for datetime (#107016) 2024-04-03 07:42:40 -04:00

The files in these subdirectories are generated by ESQL's test suite:

  • description - description of each function scraped from @FunctionInfo#description
  • examples - examples of each function scraped from @FunctionInfo#examples
  • parameters - description of each function's parameters scraped from @Param
  • signature - railroad diagram of the syntax to invoke each function
  • types - a table of each combination of support type for each parameter. These are generated from tests.
  • layout - a fully generated description for each function
  • kibana/definition - function definitions for kibana's ESQL editor
  • kibana/docs - the inline docs for kibana

Most functions can use the generated docs generated in the layout directory. If we need something more custom for the function we can make a file in this directory that can include:: any parts of the files above.

To regenerate the files for a function run its tests using gradle:

./gradlew :x-pack:plugin:esql:test -Dtests.class='*SinTests'

To regenerate the files for all functions run all of ESQL's tests using gradle:

./gradlew :x-pack:plugin:esql:test