mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 18:03:32 -04:00
* delete asciidoc files
* add migrated files
* fix errors
* Disable docs tests
* Clarify release notes page titles
* Revert "Clarify release notes page titles"
This reverts commit 8be688648d
.
* Comment out edternal URI images
* Clean up query languages landing pages, link to conceptual docs
* Add .md to url
* Fixes inference processor nesting.
---------
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Liam Thompson <leemthompo@gmail.com>
Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com>
Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
996 B
996 B
TOP
[esql-top]
Syntax
:::{image} ../../../../../images/top.svg :alt: Embedded :class: text-center :::
Parameters
field
- The field to collect the top values for.
limit
- The maximum number of values to collect.
order
- The order to calculate the top values. Either
asc
ordesc
.
Description
Collects the top values for a field. Includes repeated values.
Supported types
field | limit | order | result |
---|---|---|---|
boolean | integer | keyword | boolean |
date | integer | keyword | date |
double | integer | keyword | double |
integer | integer | keyword | integer |
ip | integer | keyword | ip |
keyword | integer | keyword | keyword |
long | integer | keyword | long |
text | integer | keyword | keyword |
Example
FROM employees
| STATS top_salaries = TOP(salary, 3, "desc"), top_salary = MAX(salary)
top_salaries:integer | top_salary:integer |
---|---|
[74999, 74970, 74572] | 74999 |