Commit graph

66 commits

Author SHA1 Message Date
Fabrizio Ferri-Benedetti
d10ef76ba3
[DOCS] Replace irregular whitespaces in docs (#128199)
* Replace irregular whitespaces

* More chars
2025-05-20 16:20:22 +02:00
Ian Wagner
d4b387c015
Minor subject/verb agreement fix (#127955)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-13 12:59:42 +01:00
Craig Taverner
7d06f815f3
Initial kibana definition files for command, currently only providing License information (#127829)
Initial Kibana definition files for commands, currently only providing License information. We leave the license field out if it works with BASIC, so the only two files that actually have a license line are:

* CHANGE_POINT: PLATINUM
* RRF: ENTERPRISE
2025-05-08 09:39:34 +02:00
Jan Kuipers
9cf2a64067
ES|QL SAMPLE aggregation function (#127629)
* ES|QL SAMPLE aggregation function

* [CI] Auto commit changes from spotless

* ThreadLocalRandom -> SplittableRandom

* Update docs/changelog/127629.yaml

* fix yaml test

* Add SampleTests

* docs + example

* polish code

* mark generated imports

* comment with algorith description

* use Randomness.get()

* close properly

* type checks

* reuse hash

* regen some files

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-05-08 08:01:53 +02:00
Alexander Spies
9e3ae5b224
ESQL: Document LU JOIN/MV_EXPAND not respecting SORT (#127718) 2025-05-07 10:59:48 +02:00
Craig Taverner
543aeb8c19
Output function signature license requirements to Kibana definitions (#127717)
Output function signature license requirements to Kibana definition files, and also test that this matches the actual licensing behaviour of the functions.

ES|QL functions that enforce license checks do so with the `LicenseAware` interface. This does not expose what that functions license level is, but only whether the current active license will be sufficient for that function and its current signature (data types passed in as fields). Rather than add to this interface, we've made the license level information test-only information. This means if a function implements LicenseAware, it also needs to add a method to its test class to specify the license level for the signature being called. All functions will be tested for compliance, so failing to add this will result in test failure. Also if the test license level does not match the enforced license, that will also cause a failure.
2025-05-07 10:02:17 +02:00
Arianna Laudazzi
1df4a90943
[Reference] Revisit query language landing page (#127632)
* Update query languauge landing page

* Update index.md

* Update docs/reference/query-languages/index.md

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-05-07 08:44:49 +02:00
Nik Everett
85027384f1
ESQL: Claim transport version to backport #124913 (#127616)
Claims a transport version in main that we will use to backport #124913
to 8.19.
2025-05-01 23:27:42 +02:00
Lisa Cawley
465ef17cba
[DOCS] Remove poor link in sql-index-frozen.md (#127543) 2025-04-30 07:59:35 -07:00
Liam Thompson
ba95390895
[DOCS][9.x] Fix tip placement in lookup-join.md (#127552)
h/t @alex-spies
2025-04-30 12:15:14 +02:00
Liam Thompson
32a4462dfe
[DOCS][9.x] Improve ESQL reference docs information architecture (#127248)
* [DOCS][9.0]  Improve ESQL reference docs IA

- reorganized es|ql reference documentation from flat list to logical hierarchy
- created three main sections: syntax reference , special fields, advanced operations
- renamed pages with more consistent and task-oriented titles
- aligned navigation titles with page content
- improved introductory text for each section
- used parallel phrasing for similar concepts
- clarified the relationship between reference docs and conceptual docs


Co-authored-by: Alexander Spies <alexander.spies@elastic.co>
2025-04-25 09:54:45 +02:00
Colleen McGinnis
08552f1c2e
[docs] Fix various syntax and rendering errors (#127062)
* fix syntax and rendering errors

* clean up

* fix versions

* more clean up

* more fixes

* more fixes

* more fixes
2025-04-24 17:57:03 +02:00
Liam Thompson
c4cba5a545
[DOCS] Update esql-lookup-join.md (#127306)
- I trimmed the KEEP query in my final iteration in https://github.com/elastic/elasticsearch/pull/127215 but neglected to update the query itself, only the response. This fixes that so the query matches the response.

- 🚘 I also updated the table response to match other ESQL response tables
2025-04-24 12:32:17 +02:00
Liam Thompson
2c2e9a5266
[DOCS][ESQL] Cleanup and cross-reference LOOKUP JOIN reference and landing pages (#127215)
* [DOCS][ESQL] Cleanup and cross-reference LOOKUP JOIN reference and landing pages

**lookup-join.md (syntax reference)**:
- removed tip formatting for simpler direct link to landing page
- improved parameter formatting and descriptions
- fixed template variable from `{esql}` to `{{esql}}`

**esql-lookup-join.md (landing page)**:
- added "compare with enrich" section header
- simplified "how the command works" with clearer parameter explanation
- added code example in how it works section
- improved image alt text for accessibility
- organized example section with better context and SQL comparison
- added dropdown for sample tables to reduce visual clutter
- added "query" subheading for clearer organization
- included reference to additional examples in command reference
- removed excessive whitespace

* Improve example, add setup code

replaced abstract employee/language example with security monitoring use case
added setup instructions for creating test indices
included sample data loading via bulk api
new practical query example joining firewall logs with threat data
simplified results output showing threat detection scenario
added note about left-join behavior
improved code comments and structure
added required index.mode: lookup setting info
2025-04-23 13:22:42 +02:00
Charlotte Hoblik
838bb0bbd7
fix superscript (#127147) 2025-04-22 18:48:15 +02:00
Craig Taverner
f6a05c6a7c
Support depthOffset in MD docs headings for nesting functions (#126984)
While this change appears subtle at this point, I am using this in a later PR that adds a lot more spatial functions, where nesting them in related groups like this looks much better.

The main impact of this is that the On this page navigator on the right panel of the docs will show the nesting

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-04-19 11:28:05 +02:00
Liam Thompson
b6c9b9b54d
[DOCS] Update URLs for ESQL Kibana generated docs (#127011) 2025-04-17 18:25:24 +02:00
Liam Thompson
92148cfde3
[DOCS] Update esql-lookup-join.md to mention index mode requirement (#126901)
*  Update esql-lookup-join.md to mention index mode requirement

* fix 8.x page mapping metadata
2025-04-16 12:15:45 +02:00
Svilen Mihaylov
02f9af732e
Add multi_match function #121525 (#125062)
Implement multi_match function for ESQL. Its currently available on snapshot builds pending refinement of the syntax.
2025-04-15 09:38:08 -04:00
Craig Taverner
ec495e9f0b
Make LOOKUP JOIN docs examples fully tested (#126622)
The current LOOKUP JOIN docs include examples that are not tested by the ES|QL tests, unlike most other examples in the documentation. This PR fixes that, changing two examples to use existing tests, and adding a new csv-spec file for the remaining four examples. These four are not required to show results, so the tests have empty data and do not require any results. This means we are testing only the syntax (parsing and semantic analysis), which is sufficient for the docs.
2025-04-14 09:57:58 +02:00
Jan Kuipers
3f2f5ee158
ES|QL change_point docs and tech preview (#126407)
* ES|QL change point docs

* Move ES|QL change_point to tech preview

* Update docs/reference/query-languages/esql/esql-commands.md

Co-authored-by: Craig Taverner <craig@amanzi.com>

* different example + add it the csv tests

* Restructure change_point docs to new structure

* Added generated test examples to change_point docs

* Fixed a few README.md text mistakes and added more details

* fix grammar

* License check

* regen parser

* Update docs/reference/query-languages/esql/_snippets/commands/layout/change_point.md

Co-authored-by: Craig Taverner <craig@amanzi.com>

---------

Co-authored-by: Craig Taverner <craig@amanzi.com>
2025-04-14 09:56:03 +02:00
Lisa Cawley
ae33eaabdb
[DOCS] Fix broken images (#126648) 2025-04-11 19:04:08 -07:00
Nik Everett
55a6624746
ESQL: TO_IP can handle leading zeros (#126532)
Modifies TO_IP so it can handle leading `0`s in ipv4s. Here's how it
works now:
```
ROW ip = TO_IP("192.168.0.1") // OK!
ROW ip = TO_IP("192.168.010.1") // Fails
```

This adds
```
ROW ip = TO_IP("192.168.010.1", {"leading_zeros": "octal"})
ROW ip = TO_IP("192.168.010.1", {"leading_zeros": "decimal"})
```

We do this because there isn't a consensus on how to parse leading zeros
in ipv4s. The standard unix tools like `ping` and `ftp` interpret
leading zeros as octal. Java's built in ip parsing interprets them as
decimal. Because folks are using this for security rules we need to
support all the choices.

Closes #125460
2025-04-11 19:45:14 +02:00
Bogdan Pintea
9784e0ec5f
ESQL: Split grouping functions based on their EVAL-ability (#126597)
This splits the grouping functions in two: those that can be evaluated independently through the EVAL operator (`BUCKET`) and those that don't (like those that that are evaluated through an agg operator, `CATEGORIZE`).

Closes #124608
2025-04-11 16:19:54 +02:00
Colleen McGinnis
24dfda583f
update mapped_pages (#126647) 2025-04-11 08:48:29 -05:00
Liam Thompson
ef633d53bd
Add license mention to ESQL categorize (#126666)
* Add license mention to ESQL categorize
exceptional licensing mention in docs
2025-04-11 11:13:12 +02:00
Craig Taverner
67b15ad5d8
Split ES|QL functions/operators/commands into separate pages for similar functions and make commands examples generated (#126279)
While the internal structure of the docs is already split into many (over 1000) sub-pages, the final display for the `Functions and Operators` page is a single giant page, making navigation harder. This PR splits it into separate pages, one for each group of similar functions and one for the operators. Twelve new pages.

This PR also bundles a few other related changes. In total what is done is:
* Split functions/operators into 12 pages, one for each group, maintaining the existing split of each function/operator into a snippet with dynamically generated examples
* Split esql-commands.md into source-commands.md and processing-commands.md, each of which is split into individual snippets, one for each command
* Each command snippet has it's examples split out into separate files, if they were examples that were dynamically generated in the older asciidoc system
* The examples files are overwritten by the ES|QL unit tests, using a similar mechanism to the examples written for functions and operators)
* Some additional refinements to the Kibana definition and markdown files (nicer operator headings, and display text)
2025-04-10 15:56:05 +02:00
Iván Cea Fontenla
90dcccfc96
ESQL: Updated RENAME docs with the behaviour of multiple column renames (#126462)
* ESQL: Updated RENAME docs with the behaviour of multiple column renames

* Added rename example to csv-spec
2025-04-09 12:39:10 +02:00
George Wallace
ce8b418686
Update esql-lookup-join.md (#126290) 2025-04-04 09:43:45 -06:00
kanoshiou
30b2a1f729
ESQL: Enhanced DATE_TRUNC with arbitrary intervals (#120302)
Originally, `DATE_TRUNC` only supported 1-month and 3-month intervals for months, and 1-year interval for years, while arbitrary intervals were supported for weeks and days. This PR adds support for `DATE_TRUNC` with arbitrary month and year intervals. 

Closes #120094
2025-04-03 16:55:56 +02:00
Benjamin Trent
33dcc921be
Mark rescore_vector as generally available (#126038)
* Mark rescore_vector as generally available

* Update docs/changelog/126038.yaml
2025-04-02 16:10:01 -04:00
Nik Everett
d30296229b
ESQL: Hide some "extras" from docs (#124763)
Hides some of the "extra" lines from ESQL's documentation. These lines
are required to make the documentation into nice tests which is
important to make sure the docs don't get out of date. But readers don't
need to see them.
2025-04-01 21:24:15 +01:00
Craig Taverner
7b263b4b83
Kibana updates, remove links from JSON and split is-null/is-not-null (#125986)
In particular:
* Remove all links (both asciidoc and markdown) from the JSON definition files.
  * This required a two phase edit, from asciidoc links to markdown, and then removal of markdown (replace with markdown text). This is because the asciidoc does not have the display text, and because some links were already markdown.
* Split predicates into is_null and is_not_null
  * We kept the old combined version because the main docs still use that, so now we have both combined and separate versions, and Kibana can select the version they want.
2025-04-01 15:46:24 +02:00
Brandon Morelli
74e4ce23e0
Update limitations.md (#125893) 2025-03-28 22:35:41 +01:00
Craig Taverner
98a2c711f8
Refine ESQL docs handling of applies_to (#125835)
This primarily splits the old preview:true warning from the newer applies_to approach. Since all of our current applies_to examples are actually just behaviour modifications of current functions, we do not use the official docs {applies_to} syntax. However there is code to make use of that in the case where we have an entirely new function which will appear in a new version.

Co-authored-by: Alexander Spies <alexander.spies@elastic.co>
2025-03-28 22:09:15 +01:00
Bogdan Pintea
1bd80d10a6
ESQL: supplement docs on LIMIT (#125839)
This adds a few extra details around how ESQL processes input docs and
how it limits output results.

Closes #125819
2025-03-29 06:03:27 +11:00
Mayya Sharipova
332abe4198
[DOCS] Clarify that min_score applies to aggs (#125882)
Clarify that min_score param of a search request
also applies to aggregations.
2025-03-28 14:41:14 -04:00
Alexander Spies
ea98166919
ESQL: Improve LOOKUP JOIN page (#125688) (#125798)
Forward port of #125688
2025-03-28 09:07:28 +01:00
Benjamin Trent
009a86a0e3
Allow zero for rescore_vector.oversample to indicate by-passing oversample and rescoring (#125599)
This allows a `rescore_vector: {oversample: 0}` to indicate bypassing
oversampling and rescoring. 

This is useful for:

 - Updating a quantized mapping to turn off automatic rescoring
 - Bypassing oversampling at query time in an ad-hoc manner if its on by default in the mapping

closes: https://github.com/elastic/elasticsearch/issues/125157
2025-03-27 06:56:51 +11:00
Larisa Motova
10719831b5
[ES|QL] Add ToAggregateMetricDouble example (#125518)
Adds AggregateMetricDouble to the ES|QL CSV tests and examples of how to
use the ToAggregateMetricDouble function
2025-03-26 07:56:48 -10:00
Bogdan Pintea
b6b8159ed9
SQL: Docs: Drop examples of LIKE/RLIKE vs QUERY/MATCH equivalence (#125673)
This drops the examples of LIKE/RLIKE vs QUERY/MATCH equivalence.
2025-03-27 03:28:38 +11:00
Karen Metts
f0168b4b84
Doc: Update links to logstash plugin docs (#125675)
* Add logstash plugin repo to cross_links
2025-03-26 11:54:37 -04:00
Tommaso Teofili
7a610c30fd
[docs] nested knn only supports score_mode max (#125582)
* [docs] nested knn only supports score_mode max
2025-03-26 11:31:43 +01:00
Alexander Spies
f8536aadda
ESQL: Add more details on ENRICH vs. LOOKUP JOIN to docs (#125487)
* Add more details on ENRICH vs. LOOKUP JOIN
* Move example, fix syntax formatting
2025-03-24 16:26:28 +01:00
Craig Taverner
8ffecb408d
Additional support for docs for ES|QL operators and version-specific differentiation (#125251)
This PR was originally focused on improving support for Kibana docs, in particular the missing operator docs, but it has expanded to cover a bunch of related things:

* Primarily the main work was to improve operators support. ESQL generated docs cover all functions and most operators for which their is a clear operator class and test class. However, some are built-in behaviour and need additional support. This PR adds more generated content for those operators.
* Various specific operators requested by Kibana: Cast & null-predicates, and in particular the addition of examples
* Two functions without examples: mv_append and to_date_nanos
* Many small visual document cleanups (spelling, grammar, capitalization, etc.)
* Initial support for `applies_to` for multi-version differentiation.

This last point requires more work, as it is not yet agreed on just how we want this to look. We'll probably need to do refinements in followup PR. Consider the version in this PR as a first step into how this could look.
2025-03-24 09:56:45 +01:00
Liam Thompson
397c9c59c7
Clarify regex character range case insensitivity limitations (#125413)
* Update regexp-syntax.md

9.x equivalent of https://github.com/elastic/elasticsearch/pull/125412

* use md syntax
2025-03-21 18:43:44 +02:00
Carlos Delgado
160ac698d7
ES|QL: Add default values for match function options (#125282) 2025-03-21 10:44:41 +01:00
Colleen McGinnis
9bcd59596d
[docs] Prepare for docs-assembler (#125118)
* reorg files for docs-assembler and create toc.yml files

* fix build error, add redirects

* only toc

* move images
2025-03-20 12:09:12 -05:00
Mike Pellegrini
f67b5d6e95
Mark semantic text as GA in docs (#124669) 2025-03-20 08:13:00 -04:00
Lisa Cawley
ec0f8be34d
[DOCS] Clean up Asciidoc links in markdown files (#125046) 2025-03-19 08:03:55 -07:00