Commit graph

12397 commits

Author SHA1 Message Date
Carlos Delgado
b39edb37a0
ESQL - Add Match function options (#120360) (#120992)
(cherry picked from commit d91d51600e)

# Conflicts:
#	docs/reference/esql/functions/description/match.asciidoc
#	docs/reference/esql/functions/kibana/definition/match.json
#	docs/reference/esql/functions/kibana/docs/match.md
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/Match.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
2025-01-28 21:36:26 +11:00
Sean Story
d1f803d959
Clarify need to submit for authorization (#119460) (#121000) 2025-01-28 21:33:08 +11:00
István Zoltán Szabó
46c664c00f
[DOCS] Adds EIS reference docs (#120706) (#120999) 2025-01-28 21:28:12 +11:00
Iraklis Psaroudakis
fc3dd77a81
Minor fix in documentation (#119385) (#120996)
Co-authored-by: Sylvain Morin <56630013+sylvain-morin@users.noreply.github.com>
2025-01-28 21:27:39 +11:00
Lee Hinman
b2e62f0d31
Document that disabling stack templates is not recommended (#120963) (#120967)
There are many features of the Elasticsearch ecosystem that may malfunction, or fail to work entirely, if these templates are not installed. This commit adds documentation cautioning against disabling the installation of templates.
2025-01-28 09:44:13 +11:00
Joe Gallo
e2761e08c3
[8.x] Add a replicate_for option to the ILM searchable_snapshot action (#119003) (#120956)
* Add a replicate_for option to the ILM searchable_snapshot action (#119003)

* Replace calls to getFirst()
2025-01-28 08:04:28 +11:00
Tommaso Teofili
791d4c1e17
Backport moving scoring in ES|QL out of snapshot into 8.x (#120905)
* Move scoring in ES|QL out of snapshot (#120354)
2025-01-27 19:46:00 +01:00
Kostas Krikellas
40d0eb0028
[DOCS] Update documentation for index sorting and routing for logsdb (#120721) (#120904)
* [DOCS] Update documentation for index sorting and routing for logsdb

* update

* Apply suggestions from code review



* Update logs.asciidoc

* Update docs/reference/data-streams/logs.asciidoc



* Update logs.asciidoc

---------

Co-authored-by: Marci W <333176+marciw@users.noreply.github.com>
2025-01-28 01:48:41 +11:00
Maxim Kholod
b074d13e72
Update index-templates.asciidoc (#113461) (#120891)
Adding `security_solution-*-*` in list of index nae to avoid the pattern collisions.

(cherry picked from commit 0638d3977a)

Co-authored-by: Smriti <152067238+smriti0321@users.noreply.github.com>
2025-01-27 12:28:45 +01:00
Carlos Delgado
4b86fda751
Match, Like and RLike operators improved docs (#120504) (#120769) 2025-01-24 19:09:38 +11:00
Stanislav Malyshev
b53e2949bb
[8.x] ES|QL async queries: Partial result on demand (#118122) (#120745)
* ES|QL async queries: Partial result on demand (#118122)

Add capability to stop async query on demand
The theory:

- User initiates async search request
- User sends the stop request (POST _query/async/<ID>/stop)
- If the async is finished by that time, it's like regular async get
- If it's not finished, the sinks are closed and the request is forcefully finished

(cherry picked from commit f27f74666f)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlQueryResponse.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/action/EsqlQueryResponseTests.java
#	x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java
#	x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS2UnavailableRemotesIT.java

* fix tests

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-01-24 07:48:18 +11:00
Mark Tozzi
109b6ff8a4
Esql Support date nanos on date diff function (#120645) (#120749)
Resolves #109999

This adds support for date nanos in the date diff function, as well as mixed nanos/millis use cases.

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-01-24 06:17:11 +11:00
Nik Everett
227f582c07
ESQL: Signatures for NOT IN et al (#120673) (#120737)
* ESQL: Signatures for `NOT IN` et al

This generates signatures for `NOT IN`, `NOT LIKE`, and `NOT RLIKE`
using a small hack on top of the process used to generate the signatures
for `IN`, `LIKE`, and `RLIKE`. This is a very perl-worth hack, replacing
`LIKE` with `NOT LIKE` in the description. But it's useful for our
kibana friends and if we need to make it nicer we can do so later.

* Zap
2025-01-24 04:13:14 +11:00
Oleksandr Kolomiiets
f73084cfca
Fix typo in synthetic source docs (#120685) (#120735) 2025-01-24 03:18:48 +11:00
István Zoltán Szabó
675a49fad2
[DOCS] Adds note about differences between chat completion and stream API (#120636) (#120710) 2025-01-24 01:07:38 +11:00
Liam Thompson
229a4aef87
Removes outdated admonition (#120556) (#120704)
Resolves /security-docs/https://github.com/elastic/security-docs/issues/6430. Removes an outdated admonition.

(cherry picked from commit 63074d8e70)

Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
2025-01-23 23:46:10 +11:00
Marci W
670faa8a73
[DOCS] Count API: clarify ways to specify search query (#120564) (#120683)
* Clarify query methods; other sprucing

* Apply suggestions from review
2025-01-23 10:32:20 +11:00
Michael Peterson
36f5a55019
Resolve/cluster allows querying for cluster info only (no index expression required) (#119898) (#120650)
Resolve/cluster allows querying for cluster-info-only (no index expression required)

This enhancement provides users with the ability to query the _resolve/cluster API endpoint without specifying
an index expression to match against. This allows users to quickly test what remote clusters are configured on
a cluster and whether they are available for querying.

The new endpoint takes no index expression:

```
GET _resolve/cluster
```

and returns the same information as before except for the "matching_indices" field. Example response:

```
{
  "remote1": {
    "connected": false,
    "skip_unavailable": true
  },
  "remote2": {
    "connected": true,
    "skip_unavailable": false,
    "version": {
      "number": "8.17.0",
      "build_flavor": "default",
      "minimum_wire_compatibility_version": "7.17.0",
      "minimum_index_compatibility_version": "7.0.0"
    }
  }
}
```

For backwards compatibility, this new endpoint works with clusters from older versions by querying with the index expression `dummy*` on those older clusters and ignoring the matching_indices value in the response they return.
2025-01-23 05:27:50 +11:00
elasticsearchmachine
2c3c8b9661
Forward port release notes for v8.17.1 (#120618)
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-01-22 15:55:28 +01:00
Andrei Stefan
8913122459
Update search-across-clusters.asciidoc to reflect the true default value of skip_unavailable setting. (#120592) (#120632) 2025-01-23 01:33:56 +11:00
elasticsearchmachine
bbc1f1d31a
Forward port release notes for v8.16.3 (#120607)
* Forward port release notes for v8.16.3

* Delete includes

* del coming tag

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-01-22 14:38:50 +01:00
Jim Ferenczi
b02de7e387
Add Multi-Field Support for Semantic Text Fields (#120128) (#120558)
Semantic text fields now support multi-fields, either as part of a multi-field structure or containing multi-fields internally.
This enhancement aligns with the semantic text field's current behavior as a standard text field.

Note: Multi-field support is only available for the new index format. Attempting to set a multi-field on an index created with the older format will still result in a failure.
2025-01-22 09:19:00 +11:00
Panagiotis Bailis
c134e7d856
[8.x] Fix for rrf documentation test using a knn retriever (#120549) 2025-01-22 05:28:45 +11:00
Mark Tozzi
5af15f42cd
[8.x] ESQL - docs for to_date_nanos (#120124) (#120203)
* ESQL - docs for to_date_nanos (#120124)

I forgot to link the ToDateNanos docs when I merged that function.
---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
 Conflicts:
	docs/reference/esql/functions/description/to_date_nanos.asciidoc
	docs/reference/esql/functions/kibana/definition/to_date_nanos.json
	docs/reference/esql/functions/kibana/docs/to_date_nanos.md
	docs/reference/esql/functions/layout/to_date_nanos.asciidoc

* ESQL - docs for to_date_nanos (#120124)

I forgot to link the ToDateNanos docs when I merged that function.
---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
 Conflicts:
	docs/reference/esql/functions/description/to_date_nanos.asciidoc
	docs/reference/esql/functions/kibana/definition/to_date_nanos.json
	docs/reference/esql/functions/kibana/docs/to_date_nanos.md
	docs/reference/esql/functions/layout/to_date_nanos.asciidoc

* unmute ToDateNanos tests, and build docs
2025-01-22 05:08:55 +11:00
István Zoltán Szabó
ff3f731b5c
[DOCS] Resolves conflicts. (#120512) 2025-01-21 12:11:36 +01:00
Liam Thompson
891408381b
[DOCS] Updated wording for clarity for new users (#120257) (#120508)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-01-21 20:33:30 +11:00
Liam Thompson
361b4bbcfc
[DOCS] Update wildcard query documentation (#120251) (#120503)
Co-authored-by: Kofi B <kofi.bartlett@elastic.co>
2025-01-21 20:27:44 +11:00
Yang Wang
4ddd9b6352
Clarify docs around disk capacity expectation. (#115745) (#120489)
Make it explicit that es expects disks to have the same capacity across all the nodes in the same data tier.

(cherry picked from commit 3ebc1f48aa)

Co-authored-by: Ievgen Degtiarenko <ievgen.degtiarenko@elastic.co>
2025-01-21 16:36:49 +11:00
Liam Thompson
9560e6b9cc
Update security-basic-setup.asciidoc (#117009) (#120457)
Fix Starting -> Stopping

Co-authored-by: Jongho Han <lgwl81@gmail.com>
2025-01-20 20:33:39 +11:00
Niels Bauman
3e09b9e79a
Include enrich.cache_size breaking change in 8.16 doc (#118161) (#120448)
This commit adds an "Ingest changes" to the breaking changes section to outline this new behavior.

Co-authored-by: Zach Brisson <162374237+ZachBrisson-Elastic@users.noreply.github.com>
2025-01-20 18:13:13 +11:00
Iván Cea Fontenla
d1f9a0ab01
ESQL: Fix ROUND() with unsigned longs throwing in some edge cases (#119536) (#120381)
There were different error cases with `ROUND(number, decimals)`:
- Decimals accepted unsigned longs, but threw a 500 with a `can't process [unsigned_long -> long]` in the cast evaluator
  - Fixed by improving the `resolveType()`
- If the number was a BigInteger unsigned long, there were 2 cases throwing an exception:
  1. Negative decimals outside the range of integer: Error
  2. Negative decimals insie the range of integer, but "big enough" for `BigInteger.TEN.pow(...)` to throw a `BigInteger would overflow supported range`
  3. -19 decimals with big unsigned longs like `18446744073709551615` was throwing an `unsigned_long overflow`

Also, when the number is a BigInteger and the decimals is a big negative (but not big enough to throw), it may be **very** slow. Taking _many_ seconds for a single computation (It tries to calculate a `10^(big number)`. I didn't do anything here, but I wonder if we should limit it.

To solve most of the cases, a warnExceptions was added for the overflow case, and a guard clause to return 0 for <-19 decimals on unsigned longs.

Another issue is that rounding to a number like 7 to -1 returns 0 instead of 10, which may be considered an error. But it's consistent, so I'm leaving it to another PR
2025-01-18 04:07:50 +11:00
Nik Everett
9ab6a72979
Add operator to ESQL signature for kibana (#120230) (#120325)
This adds a field to the kibana defintion files for each signature that
looks like:
```
  "operator": "+",
```
Kibana wants these symbols.
2025-01-17 11:31:08 -05:00
Carlos Delgado
9362cafcf3
[Docs] kNN vector rescoring for quantized vectors (#118425) (#120407) 2025-01-18 03:30:11 +11:00
Nik Everett
8253a834c2
ESQL: Move more test type error testing (#119945) (#120324)
This reduces the number of test cases in ESQL a little more ala #119678.
It migrates a few random tests and all of the multivalue functions:
```
92775 -> 43760
 3m45 -> 4m04
```

This adds a few more error test cases that were missing to make sure it all
lines up well. And it fixes a few error messages in a few functions. That's
*likely* where the extra time goes.
2025-01-17 08:47:08 +11:00
Lisa Cawley
106bc7b7bd
[DOCS] Move settings out of reindex API (#120260) (#120310) 2025-01-17 04:56:40 +11:00
George Wallace
dc63fa143e
Added additional entries for troubleshooting unhealthy cluster (#119914) (#120234)
* Added additional entries for troubleshooting unhealthy cluster

Reordered "Re-enable shard allocation" because not as common as other causes

Added additional causes of yellow statuses

Changed watermark commadn to include high and low watermark so users can make their cluster operate once again.

* Drive-by copyedit with suggestions for concision and some formatting fixes.



* Concision and some formatting fixes.



* Colon added



* Update docs/reference/troubleshooting/common-issues/red-yellow-cluster-status.asciidoc



* Title change



* Update docs/reference/troubleshooting/common-issues/red-yellow-cluster-status.asciidoc



* Spelling fix

* Update docs/reference/troubleshooting/common-issues/red-yellow-cluster-status.asciidoc



* Update docs/reference/troubleshooting/common-issues/red-yellow-cluster-status.asciidoc



* Update docs/reference/troubleshooting/common-issues/red-yellow-cluster-status.asciidoc



* Update docs/reference/troubleshooting/common-issues/red-yellow-cluster-status.asciidoc



---------

Co-authored-by: Kofi B <seanziee@gmail.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2025-01-16 07:25:24 +11:00
Pat Whelan
1ea495ebb2
[ML] Update docs to say PUT instead of POST (#120215) (#120226) 2025-01-16 06:17:47 +11:00
Mark Tozzi
68de069291
Esql - support date nanos in date format function (#120143) (#120218)
This adds support for passing Date Nanos into the Date Format function. It works for both the single argument and two argument versions. Format strings are unchanged, as the same formatting logic works for both resolutions.

resolves #109994

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-01-16 04:54:38 +11:00
Nik Everett
a61670ea7f
ESQL: Limit memory usage of fold (#118602) (#120100)
`fold` can be surprisingly heavy! The maximally efficient/paranoid thing
would be to fold each expression one time, in the constant folding rule,
and then store the result as a `Literal`. But this PR doesn't do that
because it's a big change. Instead, it creates the infrastructure for
tracking memory usage for folding as plugs it into as many places as
possible. That's not perfect, but it's better.

This infrastructure limit the allocations of fold similar to the
`CircuitBreaker` infrastructure we use for values, but it's different
in a critical way: you don't manually free any of the values. This is
important because the plan itself isn't `Releasable`, which is required
when using a real CircuitBreaker. We could have tried to make the plan
releasable, but that'd be a huge change.

Right now there's a single limit of 5% of heap per query. We create the
limit at the start of query planning and use it throughout planning.

There are about 40 places that don't yet use it. We should get them
plugged in as quick as we can manage. After that, we should look to the
maximally efficient/paranoid thing that I mentioned about waiting for
constant folding. That's an even bigger change, one I'm not equipped
to make on my own.
2025-01-15 14:33:58 +01:00
István Zoltán Szabó
1cd0ebc024
[DOCS] Clarifies param description of model_size_bytes. (#120190) (#120194) 2025-01-15 23:42:11 +11:00
Liam Thompson
738bdfa7dd
[DOCS] More targeted link for ESQL in CCS overview (#120125) (#120185) 2025-01-15 20:58:56 +11:00
Liam Thompson
7637d95119
[AutoOps] Reference AutoOps solution on troubleshooting pages (#119630) (#120181)
* Reference AutoOps on troubleshooting pages

* Integrate reviewer's feedback

(cherry picked from commit 70e5a67904)

# Conflicts:
#	docs/reference/troubleshooting/common-issues/circuit-breaker-errors.asciidoc
#	docs/reference/troubleshooting/common-issues/hotspotting.asciidoc

Co-authored-by: Arianna Laudazzi <46651782+alaudazzi@users.noreply.github.com>
2025-01-15 20:33:17 +11:00
Mark Tozzi
7603eded80
[8.x] ESQL Support IN operator for Date nanos (#119772) (#120126)
* ESQL Support IN operator for Date nanos (#119772)

Add support for using nanosecond dates with the IN operator. This behavior should be consistent with equals, and support comparisons between milliseconds and nanoseconds the same as the binary comparison operators support it.

Resolves #118578

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>

* remove use of future java functions

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-01-15 03:52:02 +11:00
Orestis Floros
b38748edc7
Permissions required for stateful agentless integrations (#118644) (#119973)
Closes elastic/security-team#11102
Closes elastic/security-team#11104

This allows agentless integrations (via elastic/beats#41446, elastic/kibana#203810) to write to agentless-* indices. Each index is created on-demand by the filebeat client and kibana conditionally extends the API key permissions to allow writing to the index.

(cherry picked from commit 3c184b912c)

# Conflicts:
#	docs/reference/rest-api/security/get-service-accounts.asciidoc
#	x-pack/plugin/security/qa/service-account/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/service/ServiceAccountIT.java
#	x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/service/ElasticServiceAccounts.java
2025-01-13 17:44:49 +00:00
Mark Tozzi
02835dcf28
Esql additional date format testing (#120000) (#120056)
This wires up the randomized testing for DateFormat. Prior to this PR, none of the randomized testing was hitting the one parameter version of the function, so I wired that up as well. This required some compromises on the type signatures, see comments in line.less

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-01-14 02:21:27 +11:00
Jonathan Buttner
6805330b23
[ML] Adding docs for the unified inference API (#118696) (#120057)
* Including examples

* Using js instead of json

* Adding unified docs to main page

* Adding missing description text

* Refactoring to remove unified route

* Addign back references to the _unified route

* Update docs/reference/inference/chat-completion-inference.asciidoc



* Address feedback

---------

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2025-01-14 02:13:44 +11:00
Liam Thompson
9520cfe961
[DOCS][8.x] Forward port 8.16.2 release notes (#120039) 2025-01-13 12:08:57 +01:00
George Wallace
0c432ae2cc
Adjustments to match Opster, readability (#119812) (#120032)
* Adjustments to match Opster, readability

https://opster.com/guides/elasticsearch/search-apis/elasticsearch-bool-queries/

* Edits



* Spacing



---------

Co-authored-by: Kofi B <23384471+thekofimensah@users.noreply.github.com>
2025-01-13 20:17:07 +11:00
Carlos Delgado
faf566577e
ESQL - Update QSTR docs (#120026) 2025-01-13 08:44:36 +00:00
James Baiera
dcb139424d
[8.x] Add selector syntax to index expressions (#118614) (#119832)
* Add selector syntax to index expressions (#118614)

This PR introduces a new syntactical feature to index expression resolution: The selector.

Selectors, denoted with a :: followed by a recognized suffix will allow users to specify which component of
an index abstraction they would like to operate on within an API call. In this case, an index abstraction is a
concrete index, data stream, or alias; Any abstraction that can be resolved to a set of indices/shards. We
define a component of an index abstraction to be some searchable unit of the index abstraction.

(cherry picked from commit c3839e1f76)

# Conflicts:
#	modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/IngestFailureStoreMetricsIT.java
#	server/src/main/java/org/elasticsearch/TransportVersions.java
#	server/src/test/java/org/elasticsearch/action/OriginalIndicesTests.java

* [CI] Auto commit changes from spotless

* Fixing compiler issues

* Remove feature flag from influencing the serialisation

* Only add failure indices when failure store flag is on

* Fix OriginalIndicesTests

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
Co-authored-by: Mary Gouseti <mary.gouseti@elastic.co>
Co-authored-by: Mary Gouseti <mgouseti@gmail.com>
2025-01-10 17:39:43 -05:00