Commit graph

12579 commits

Author SHA1 Message Date
Jan Kuipers
df76c15edd
ES|QL sample documentation (#129350)
* ES|QL sample documentation

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

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

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-06-17 10:56:14 +02:00
Charlotte Hoblik
efefe7965f
[DOCS]: Move _reindex API examples to ES reference documentation (#129341)
* Add Reindex indices examples

* Update docs/reference/elasticsearch/rest-apis/reindex-indices.md

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

* Update section structure and add TOC

* Add back the TEST snippets

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-06-17 10:13:46 +02:00
Julian Kiryakov
7fb130c53b
Add Support for LIKE (LIST) (#129170)
Adds support for LIKE function alternative syntax with a list of patterns.
Examples:

FROM foo
| WHERE bar LIKE ("A*","B*", "C?")
The new syntax is documented as part of the existing LIKE function documentation. We will use the existing WildcardLike java implementation for existing cases using the old syntax and one list argument case to improve mixed cluster compatibility.
2025-06-17 03:49:44 +02:00
Tommaso Teofili
629a366baa
Make dense_vector fields updatable to bbq_flat/bbq_hnsw (#128291) 2025-06-16 17:15:59 +02:00
Liam Thompson
61594dad63
Fix example in keyword.md (#129056)
9.x version of https://github.com/elastic/elasticsearch/pull/129053
2025-06-16 14:50:51 +02:00
Ioana Tagirta
4daf983ea9
Docs: Fix indentation for query options (#129395) 2025-06-13 15:40:52 +02:00
Joe Gallo
87ed699352
Fix the rendering of a table in the normalize_for_stream docs (#129345) 2025-06-12 11:02:48 -04:00
István Zoltán Szabó
32e6873279
[DOCS] Adds term vectors API examples (#129328)
* [DOCS] Adds term vectors API examples.

* Update docs/reference/elasticsearch/rest-apis/term-vectors-examples.md

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

* [DOCS] Addresses feedback.

* [DOCS] Fixes link.

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-06-12 14:20:54 +02:00
Jim Ferenczi
358ada7b3f
Add none chunking strategy to disable automatic chunking for inference endpoints (#129150)
This introduces a `none` chunking strategy that disables automatic chunking when using an inference endpoint.
It enables users to provide pre-chunked input directly to a `semantic_text` field without any additional splitting.

The chunking strategy can be configured either on the inference endpoint or directly in the `semantic_text` field definition.

**Example:**

```json
PUT test-index
{
  "mappings": {
    "properties": {
      "my_semantic_field": {
        "type": "semantic_text",
        "chunking_settings": {
          "strategy": "none"    <1>
        }
      }
    }
  }
}
```

<1> Disables automatic chunking on `my_semantic_field`.

```json
PUT test-index/_doc/1
{
    "my_semantic_field": ["my first chunk", "my second chunk", ...]    <1>
    ...
}
```

<1> Pre-chunked input provided as an array of strings.
Each array element represents a single chunk that will be sent directly to the inference service without further processing.
2025-06-12 10:44:53 +01:00
Kathleen DeRusso
17d463f6bf
Register match_phrase as a function not a snapshot function (#129255)
* Register match_phrase as a function not a snapshot function

* Update usage
2025-06-11 13:01:24 -04:00
Liam Thompson
778b868227
[ESQL] Fix typo in search-functions.md (#129260)
^^
2025-06-11 15:42:45 +02:00
István Zoltán Szabó
045c23339d
[DOCS] Adds preview tag to the CHANGE_POINT ES|QL command in the command list. (#129247) 2025-06-11 13:21:55 +02:00
Bogdan Pintea
6c7730d1c9
ESQL: Extend RENAME syntax to allow a new = old syntax (#129212)
This extends RENAME's grammar to allow a new syntax: `| RENAME new_name
= old_name` This is supported along the existing `... old_name AS
new_name` syntax.

Closes #129208
2025-06-11 21:16:48 +10:00
Larisa Motova
1333ea8883
[ES|QL] Specify population in StdDev docs (#129225)
There are 2 types of Standard Deviation: population and
sample, this commit clarifies that the existing is population.
2025-06-10 12:47:11 -10:00
Carlos Delgado
366e00f5c5
ES|QL - kNN function initial support (#127322) 2025-06-10 11:11:42 +02:00
Ioana Tagirta
15dd896a61
Remove null example for match_phrase (#129173) 2025-06-10 10:27:15 +02:00
Kathleen DeRusso
b214fbfcdc
Take match_phrase out of snapshot and make tech preview (#128925)
* Take match_phrase out of snapshot and make tech preview

* Update docs/changelog/128925.yaml

* PR feedback

* Adding regenerated test data

* Update docs/changelog/128925.yaml

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>

* [CI] Auto commit changes from spotless

* Checkstyle

* Correct docs

* Hopefully fix docs build

* Found one more bad docs link - here's hoping this now fixes the doc build

* OMG bitten by - vs _

---------

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>
Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Aurélien FOUCRET <aurelien.foucret@gmail.com>
2025-06-09 18:55:49 +02:00
Kathleen DeRusso
5d22ad6874
Add clarification to semantic_text documentation on default quantization and lexical search support (#128927)
* Add clarifications to semantic text documentation

* Regnerate match ESQL docs

* Fix whitespace

* PR feedback

* Update docs/reference/elasticsearch/mapping-reference/semantic-text.md

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

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-06-06 15:01:50 +02:00
Marci W
a0bfe61a83
Remove stale synthetic source preview note (#128981) 2025-06-05 09:31:25 -04:00
Kathleen DeRusso
eee423aaa0
[ES|QL] Add MATCH_PHRASE (#127661)
* Initial commit of match_phrase

* Add MatchPhraseQueryTests

* First pass at CSV specs

* Update docs/changelog/127661.yaml

* Refactor so MatchPhrase doesn't use all fulltext test cases, just text only

* Fix tests

* Add some CSV test cases

* Fix test

* Update changelog

* Update tests

* Comment out MATCH_PHRASE in search-functions Markdown

* Minor PR feedback

* PR feedback - refactor/consolidate code

* Add some more tests

* Fix some tests

* [CI] Auto commit changes from spotless

* Fix tests

* PR feedback - add tests, support boost and numeric data

* Revert "PR feedback - add tests, support boost and numeric data"

This reverts commit 4e7a699e3e.

* Apply testing/PR feedback outside numeric support only

* Regenerate docs

* Add negative test

* Update x-pack/plugin/esql/qa/testFixtures/src/main/resources/match-phrase-function.csv-spec

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>

* Update x-pack/plugin/esql/qa/testFixtures/src/main/resources/match-phrase-function.csv-spec

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>

* Update x-pack/plugin/esql/qa/testFixtures/src/main/resources/match-phrase-function.csv-spec

Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>

* PR feedback

* Fix auto-commit error

* Regenerate docs

* Update x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchPhrase.java

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

* Remove non text field types

* Fake test data

* Remove tests that no longer should pass without ip/date/version support

* Put real data in score tests now that I was able to engineer a failure

* Realized the scoring test might be flakey because how it was written, updated

* PR feedback

* PR feedback

* [CI] Auto commit changes from spotless

* Add check to MatchPhrase tests

* Fix merge errors

* [CI] Auto commit changes from spotless

* Test generated docs

* Add additional verifier tests

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-06-04 12:32:24 -04:00
mbivert-ipsos
aa0a829a08
[DOCS] Fix missing spaces (#128550) 2025-06-04 18:59:42 +03:00
Lisa Cawley
4b7a9bd563
[DOCS] Add missing index setting link (#128794) 2025-06-03 11:40:05 -07:00
eyalkoren
d3d2d9b996
Adding NormalizeForStreamProcessor (#125699) 2025-06-03 13:11:12 -04:00
Charlotte Hoblik
38fb46d366
Add Connectors release notes for 9.0.2 (#128555) 2025-06-03 15:24:06 +02:00
Craig Taverner
11f0c5526a
ES|QL Support for ST_GEOHASH, ST_GEOTILE and ST_GEOHEX (#125143)
Added support for the three primary scalar grid functions:
* `ST_GEOHASH(geom, precision)`
* `ST_GEOTILE(geom, precision)`
* `ST_GEOHEX(geom, precision)`

As well as versions of these three that take an optional `geo_shape` boundary (must be a `BBOX` ie. `Rectangle`).

And also supporting conversion functions that convert the grid-id from long to string and back to long.

This work represents the core of the feature to support geo-grid aggregations in ES|QL.
2025-06-03 11:49:34 +02:00
Mridula
81fba27b6b
Add l2_norm normalization support to linear retriever (#128504)
* New l2 normalizer added

* L2 score normaliser is registered

* test case added to the yaml

* Documentation added

* Resolved checkstyle issues

* Update docs/changelog/128504.yaml

* Update docs/reference/elasticsearch/rest-apis/retrievers.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Score 0 test case added to check for corner cases

* Edited the markdown doc description

* Pruned the comment

* Renamed the variable

* Added comment to the class

* Unit tests added

* Spotless and checkstyle fixed

* Fixed build failure

* Fixed the forbidden test

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-02 14:59:03 +01:00
Ioana Tagirta
abf5f00413
Document boost option for match_phrase (#128738) 2025-06-02 11:57:03 +02:00
George Wallace
4eca31756f
Update dissect-processor.md (#128708) 2025-06-02 08:49:45 +02:00
Nik Everett
1b151eda4b
ESQL: Compute engine support for tagged queries (#128521)
Begins adding support for running "tagged queries" to the compute
engine. Here, it's just the `LuceneSourceOperator` because that's
useful and contained.

Example time! Say you are running:
```
FROM foo
| STATS MAX(v) BY ROUND_TO(g, 0, 100, 1000, 100000)
```

It's *often* faster to run this as four queries:
* The docs that round to `0`
* The docs that round to `100`
* The docs that round to `1000`
* The docs that round to `100000`

This creates an ESQL operator that can run these queries, one after the
other and attach those tags.

Aggs uses this trick and it's *way* faster when it can push down count
queries, but it's still faster when it pushes doc loading things. This
implementation in `LuceneSourceOperator` is quite similar to the doc
loading version in _search.

I don't have performance measurements yet because I haven't plugged this
into the language. In _search we call this `filter-by-filter` and enable
it when each group averages to more than 5000 documents and when there
isn't an `_doc_count` field. It's faster in those cases not to push. I
expect we'll be pretty similar.
2025-05-29 12:41:58 -04:00
Lisa Cawley
3b54afd2b7
[DOCS] Edit dynamic and static setting links (#128537) 2025-05-29 08:00:11 -07:00
Liam Thompson
0a46527232
[DOCS] Document join field type not available on serverless currently (#128496) 2025-05-27 09:51:35 +02:00
Fabrizio Ferri-Benedetti
314dc1a20e
Replace chars (#128439) 2025-05-26 11:01:12 +02:00
Ioana Tagirta
55956d4029
Docs: Fix match_phrase docs for zero_terms_query (#128387) 2025-05-23 19:33:26 +02:00
Nik Everett
584c60e233
ESQL: Enable docs for ROUND_TO (#128378)
Plug the docs in for ROUND_TO.
2025-05-23 19:06:05 +02:00
Nik Everett
dd180be55d
ESQL: Fix docs for ROUND_TO (#128382)
The examples included a filter we use for testing by mistake.
2025-05-24 01:28:29 +10:00
Nik Everett
45bfaab448
ESQL: ROUND_TO function (#128278)
Creates a `ROUND_TO` function that rounds it's input to one of the
provided values. Like so:
```
ROUND_TO(v, 0, 5000, 10000, 20000, 40000, 100000)

   v   | ROUND_TO
     0 | 0
   100 | 0
  6000 | 5000
 45001 | 40000
999999 | 100000
```

For some sequences of numbers you could do this with the `/` operator -
but for arbitrary sequences of numbers you needed `CASE` which is quite
slow. And hard to read!

Rewriting the example above would look like:
```
CASE (
  v <   5000,     0,
  v <  10000,  5000,
  v <  20000, 10000,
  v <  40000, 20000,
  v < 100000, 40000,
  100000
)
```

Even better, this is *fast*:
```
        (operation)  Mode  Cnt    Score   Error  Units
round_to_4_via_case  avgt    7  138.124 ± 0.738  ns/op
         round_to_4  avgt    7    0.805 ± 0.011  ns/op
         round_to_3  avgt    7    0.739 ± 0.011  ns/op
         round_to_2  avgt    7    0.651 ± 0.009  ns/op
         date_trunc  avgt    7    2.425 ± 0.018  ns/op
```

I've included a comparison to `DATE_TRUNC` above because we should be
able to rewrite `DATE_TRUNC` into `ROUND_TO` when we know the date range
of the index. This doesn't do it now, but it should be possible.
2025-05-23 10:14:30 -04:00
Jan Calanog
cae06b8c54
Fix code-callout rendering (#128365) 2025-05-23 13:42:04 +02:00
Carles Salvador
b977b04a2e
Rename Azure Active Directory to Microsoft Entra ID (#128351)
* Rename Azure Active Directory to Microsoft Entra ID 

Based on Microsoft change: https://learn.microsoft.com/en-us/entra/fundamentals/new-name

* Update docs/reference/search-connectors/es-connectors-sharepoint-online.md

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

* Update docs/reference/search-connectors/es-connectors-sharepoint-online.md

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

* Update docs/reference/search-connectors/es-connectors-sharepoint-online.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-23 11:40:01 +02:00
Nik Everett
b8e2fce60a
ESQL: Document VALUES uniques (#128157)
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


---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-05-22 15:50:29 +02:00
Charlotte Hoblik
5f9c4017c4
Add application permission to outlook connector (#128235) 2025-05-22 10:50:44 +02:00
shmuelhanoch
db644e20c8
Added esql scalb function. (#127696)
Co-authored-by: Shmuel Hanoch <shmuel.hanoch@elastic.co>
2025-05-22 10:47:44 +03:00
Colleen McGinnis
ab5ff67bce
[docs] Add products to docset.yml (#128274)
* add products to docset.yml

* add page-level painless tags
2025-05-21 13:55:32 -05:00
Liam Thompson
960222e0dc
[DOCS] Make ESQL functions/operators/commands overview accordions open by default (#128197) 2025-05-21 12:08:04 +02:00
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
Parker Timmins
c04a9569fe
Do not respect synthetic_source_keep=arrays if type parses arrays (#127796)
Types that parse arrays directly should not need to store values in _ignored_source if synthetic_source_keep=arrays. Since they have custom handling of arrays, it provides no benefit to store in _ignored_source when there are multiple values of the type.
2025-05-09 14:49:15 -05: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
Oleksandr Kolomiiets
5d6dffaa51
Fix more typos in new text docs (#127855) 2025-05-08 06:20:08 +10:00
Charlotte Hoblik
d0e3af7990
[DOCS]: Add connector release notes page for 9.x (#127803)
* Add connector release notes page

* Add 9.0.0 release notes

* Add 9.0.1 Release notes

* Update docs/reference/search-connectors/release-notes.md

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

* Align IDs to MINOR_VERSION variable

* Update docs/reference/search-connectors/release-notes.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 17:29:11 +02:00