Skip to content

Commit 00644f2

Browse files
committed
ESQL: Document VALUES uniques
Documents that the VALUES aggregate function returns unique documents and points folks to the TOP aggregate function if they want to keep dupes. Closes #128091
1 parent 923a8e1 commit 00644f2

File tree

5 files changed

+13
-5
lines changed
  • docs/reference/query-languages/esql
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate

5 files changed

+13
-5
lines changed

docs/reference/query-languages/esql/_snippets/functions/appendix/values.md

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/description/values.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/definition/functions/values.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/kibana/docs/functions/values.md

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Values.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ public class Values extends AggregateFunction implements ToAggregator {
7272
"long",
7373
"version" },
7474
preview = true,
75-
description = "Returns all values in a group as a multivalued field. The order of the returned values isn’t guaranteed. "
76-
+ "If you need the values returned in order use <<esql-mv_sort>>.",
75+
description = """
76+
Returns unique values as a multivalued field. The order of the returned values isn’t guaranteed.
77+
If you need the values returned in order use <<esql-mv_sort>>.""",
7778
appendix = """
79+
::::{note}
80+
Use <<esql-top>> if you need to keep repeated values.
81+
::::
7882
::::{warning}
7983
This can use a significant amount of memory and ES|QL doesn’t yet
8084
grow aggregations beyond memory. So this aggregation will work until

0 commit comments

Comments
 (0)