Commit Graph

12524 Commits

Author SHA1 Message Date
Arianna Laudazzi e9fe219067
[Reference] Revisit scripting language landing page (#127675)
* Update scripting language landing page

* Update index.md
2025-05-07 08:02:12 +02:00
Arianna Laudazzi d90121f048
Update es plugins landing page (#127682) 2025-05-07 07:51:22 +02:00
Oleksandr Kolomiiets 33fdca8bc5
Fix typos in new text docs (#127790) 2025-05-07 08:29:34 +10:00
Oleksandr Kolomiiets 0df9d1c4c2
Text field block loader properly handles null values from delegate (#127525) 2025-05-06 12:29:04 -07:00
Benjamin Trent 8bb7dc4058
Improve HNSW filtered search speed through new heuristic (#126876)
Apache Lucene 10.2 exposes a new search strategy for executing filtered searches over HNSW graphs.

This PR switches to utilizing that strategy by default as it generally provides a much better recall/latency pareto frontier than our regular hnsw fanout search.

Additionally, a new tech-preview setting is provided to potentially revert to the old fanout behavior if issues arise.
2025-05-06 13:41:16 -04:00
Nik Everett 85027384f1
ESQL: Claim transport version to backport #124913 (#127616)
docs-build / docs-preview (push) Waiting to run Details
Validate Gradle Wrapper / Validation (push) Waiting to run Details
Claims a transport version in main that we will use to backport #124913
to 8.19.
2025-05-01 23:27:42 +02:00
Mike Pellegrini 9f8c9c9c59
Mark semantic text inference_id param as optional (#127586) 2025-04-30 17:10:11 -04:00
Lisa Cawley 465ef17cba
[DOCS] Remove poor link in sql-index-frozen.md (#127543) 2025-04-30 07:59:35 -07:00
Lisa Cawley 3b334da5fe
[DOCS] Fix poor link in community-id-processor.md (#127533) 2025-04-30 07:26:10 -07:00
Lisa Cawley 0b3397d6a5
[DOCS] Remove poor link from painless.md (#127544) 2025-04-30 07:12:26 -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
Pete Gillin 061a751a09
Fix a one-word typo in the `date` processor docs (#127548)
docs-build / docs-preview (push) Waiting to run Details
Validate Gradle Wrapper / Validation (push) Waiting to run Details
This erroneously claimed that the example used a `drop` processor
(which drops whole documents) when it actually uses a `remove`
processor (which removes fields).
2025-04-30 10:03:43 +02:00
Nik Everett 10336c950c
ESQL: Speed loading stored fields (#127348)
This speeds up loading from stored fields by opting more blocks into the
"sequential" strategy. This really kicks in when loading stored fields
like `text`. And when you need less than 100% of documents, but more than,
say, 10%. This is most useful when you need 99.9% of field documents.
That sort of thing. Here's the perf numbers:
```
%100.0 {"took": 403 -> 401,"documents_found":1000000}
%099.9 {"took":3990 -> 436,"documents_found": 999000}
%099.0 {"took":4069 -> 440,"documents_found": 990000}
%090.0 {"took":3468 -> 421,"documents_found": 900000}
%030.0 {"took":1213 -> 152,"documents_found": 300000}
%020.0 {"took": 766 -> 104,"documents_found": 200000}
%010.0 {"took": 397 ->  55,"documents_found": 100000}
%009.0 {"took": 352 -> 375,"documents_found":  90000}
%008.0 {"took": 304 -> 317,"documents_found":  80000}
%007.0 {"took": 273 -> 287,"documents_found":  70000}
%005.0 {"took": 199 -> 204,"documents_found":  50000}
%001.0 {"took":  46 ->  46,"documents_found":  10000}
```

Let's explain this with an example. First, jump to `main` and load a
million documents:
```
rm -f /tmp/bulk
for a in {1..1000}; do
    echo '{"index":{}}' >> /tmp/bulk
    echo '{"text":"text '$(printf %04d $a)'"}' >> /tmp/bulk
done

curl -s -uelastic:password -HContent-Type:application/json -XDELETE localhost:9200/test
for a in {1..1000}; do
    echo -n $a:
    curl -s -uelastic:password -HContent-Type:application/json -XPOST localhost:9200/test/_bulk?pretty --data-binary @/tmp/bulk | grep errors
done
curl -s -uelastic:password -HContent-Type:application/json -XPOST localhost:9200/test/_forcemerge?max_num_segments=1
curl -s -uelastic:password -HContent-Type:application/json -XPOST localhost:9200/test/_refresh
echo
```

Now query them all. Run this a few times until it's stable:
```
echo -n "%100.0 "
curl -s -uelastic:password -HContent-Type:application/json -XPOST 'localhost:9200/_query?pretty' -d'{
    "query": "FROM test | STATS SUM(LENGTH(text))",
    "pragma": {
        "data_partitioning": "shard"
    }
}' | jq -c '{took, documents_found}'
```

Now fetch 99.9% of documents:
```
echo -n "%099.9 "
curl -s -uelastic:password -HContent-Type:application/json -XPOST 'localhost:9200/_query?pretty' -d'{
    "query": "FROM test | WHERE NOT text.keyword IN (\"text 0998\") | STATS SUM(LENGTH(text))",
    "pragma": {
        "data_partitioning": "shard"
    }
}' | jq -c '{took, documents_found}'
```

This should spit out something like:
```
%100.0 { "took":403,"documents_found":1000000}
%099.9 {"took":4098, "documents_found":999000}
```

We're loading *fewer* documents but it's slower! What in the world?!
If you dig into the profile you'll see that it's value loading:
```
$ curl -s -uelastic:password -HContent-Type:application/json -XPOST 'localhost:9200/_query?pretty' -d'{
    "query": "FROM test | STATS SUM(LENGTH(text))",
    "pragma": {
        "data_partitioning": "shard"
    },
    "profile": true
}' | jq '.profile.drivers[].operators[] | select(.operator | contains("ValuesSourceReaderOperator"))'
{
  "operator": "ValuesSourceReaderOperator[fields = [text]]",
  "status": {
    "readers_built": {
      "stored_fields[requires_source:true, fields:0, sequential: true]": 222,
      "text:column_at_a_time:null": 222,
      "text:row_stride:BlockSourceReader.Bytes": 1
    },
    "values_loaded": 1000000,
    "process_nanos": 370687157,
    "pages_processed": 222,
    "rows_received": 1000000,
    "rows_emitted": 1000000
  }
}
$ curl -s -uelastic:password -HContent-Type:application/json -XPOST 'localhost:9200/_query?pretty' -d'{
    "query": "FROM test | WHERE NOT text.keyword IN (\"text 0998\") | STATS SUM(LENGTH(text))",
    "pragma": {
        "data_partitioning": "shard"
    },
    "profile": true
}' | jq '.profile.drivers[].operators[] | select(.operator | contains("ValuesSourceReaderOperator"))'
{
  "operator": "ValuesSourceReaderOperator[fields = [text]]",
  "status": {
    "readers_built": {
      "stored_fields[requires_source:true, fields:0, sequential: false]": 222,
      "text:column_at_a_time:null": 222,
      "text:row_stride:BlockSourceReader.Bytes": 1
    },
    "values_loaded": 999000,
    "process_nanos": 3965803793,
    "pages_processed": 222,
    "rows_received": 999000,
    "rows_emitted": 999000
  }
}
```

It jumps from 370ms to almost four seconds! Loading fewer values! The
second big difference is in the `stored_fields` marker. In the second on
it's `sequential: false` and in the first `sequential: true`.

`sequential: true` uses Lucene's "merge" stored fields reader instead of
the default one. It's much more optimized at decoding sequences of
documents.

Previously we only enabled this reader when loading compact sequences of
documents - when the entire block looks like
```
1, 2, 3, 4, 5, ... 1230, 1231
```

If there are any gaps we wouldn't enable it. That was a very
conservative thing we did long ago without doing any experiments. We
knew it was faster without any gaps, but not otherwise. It turns out
it's a lot faster in a lot more cases. I've measured it as faster for
99% gaps, at least on simple documents. I'm a bit worried that this is
too aggressive, so I've set made it configurable and made the default
being to use the "merge" loader with 10% gaps. So we'd use the merge
loader with a block like:
```
1, 11, 21, 31, ..., 1231, 1241
```
2025-04-29 23:20:15 +02:00
Pete Gillin 35c2b25415
Add info to `date` processor docs (#127434)
This does two things:

 - It describes what the `timezone` option actually does. The existing wording is misleading.
 - It recommends avoiding short abbreviations for timezones such as `PST`. This has come up at least twice recently.
2025-04-29 13:40:36 +01: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 7b95ec4767
[DOCS] Clarify update behavior for indices with semantic_text fields, flag CCS/CCR limitation (#127310) 2025-04-24 12:19:48 +02:00
Ioana Tagirta a684e109f7
Improve listing of index mode options in docs (#127155) 2025-04-24 09:58:16 +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
István Zoltán Szabó 1e7c6abaf6
[DOCS] Fixes formatting issue on dense vector reference page. (#127214) 2025-04-23 11:24:17 +02:00
Ahmed Khan 98a3719e46
Update elasticsearch-keystore.md with special character handling and echo command to enter the password. (#127135)
* Update elasticsearch-keystore.md

Customer needs document update for handling special characters and how we can use the echo command to enter the password.

* Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md

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

* Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md

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

* Update elasticsearch-keystore.md

Moving the section out of Examples as advised.

* Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md

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

* Update docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md

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

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-04-23 09:40:38 +02:00
Charlotte Hoblik 838bb0bbd7
fix superscript (#127147) 2025-04-22 18:48:15 +02:00
George Wallace b98a4fa067
Fixing external link (#127114) 2025-04-21 17:57:48 +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
Brian Seeders af6dac5c05
Revert "Forward port release notes for v8.17.5 (#127024)"
This reverts commit 66b504a881.
2025-04-17 16:16:21 -04:00
elasticsearchmachine 66b504a881
Forward port release notes for v8.17.5 (#127024) 2025-04-17 16:15:42 -04:00
David Turner 7e62862eab
Clarify queues in thread pool settings (#127027)
The docs about the queue in a `fixed` pool are a little awkwardly
worded, and there is no mention of the queue in a `scaling` pool at all.
This commit cleans this area up.
2025-04-17 19:58:02 +01:00
Liam Thompson b6c9b9b54d
[DOCS] Update URLs for ESQL Kibana generated docs (#127011) 2025-04-17 18:25:24 +02:00
Samiul Monir afb83b7551
Updating text_similarity_reranker documentation (#127004)
* updating documentation to remove duplicate and redundant wording from 9.x

* Update links to rerank model landing page

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-04-17 11:54:19 -04:00
Tim Vernum e53d3ff64b
Update docs to reflect removal of TLSv1.1 (#126892)
In ES9 and later, we do not enable TLSv1.1 by default,
even if the JDK supports it.

This updates the docs accordingly.

Relates: #121731
2025-04-17 10:15:29 +10:00
Samiul Monir 2e1101cf5e
Updating text_similarity_reranker documentation (#126175)
* Updating text_similarity_reranker documentation

* Updating docs to include urls

* remove extra THE from the text

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-16 17:05:30 -04: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
Liam Thompson 7de46e9897
[DOCS] Update es-connectors-salesforce.md (#126828)
* [DOCS] Update es-connectors-salesforce.md

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

* Reformat known issues section
2025-04-15 11:47:36 +02:00
Kofi B 08beb534ef
[DOCS] Added sort order explanation (#125182)
* Added explanation of sort order and default behavior

* Update docs/reference/elasticsearch/rest-apis/sort-search-results.md

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

---------

Co-authored-by: George Wallace <georgewallace@users.noreply.github.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-04-14 10:28:03 +02: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
Kathleen DeRusso 489a38895e
Update chunking_settings docs for semantic_text (#126634)
* Update chunking_settings docs for semantic_text

* Remove redundancy
2025-04-11 08:55:47 -04: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
Larisa Motova 1324f82ed2
Update keyword ignore_above documentation for logsdb (#126651)
This commit adds a note that ignore_above has a different limit for
logsdb indices to the documentation.

Related to https://github.com/elastic/docs-content/pull/1092 and
https://github.com/elastic/sdh-elasticsearch/issues/8892
2025-04-10 21:49:47 -10:00
Lisa Cawley 627e3099f6
[DOCS] Add node specifications to API conventions (#126571)
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2025-04-10 19:08:40 +02:00
Lisa Cawley 6c4a230858
[DOCS] Add ranking evaluation API examples (#126577) 2025-04-10 09:50:15 -07: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
Charlotte Hoblik e9d3328903
[DOCS]: Move ES connectors `Known issues` page in 9.0+ (#126600)
* add known issues page to es connectors

* update known issues

* Update docs/reference/search-connectors/es-connectors-known-issues.md

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

* Update docs/reference/search-connectors/es-connectors-known-issues.md

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

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-04-10 15:26:20 +02:00
Colleen McGinnis 1b021c58df
fix cross-repo link syntax (#126554) 2025-04-09 14:46:19 -04:00