Commit Graph

10962 Commits

Author SHA1 Message Date
Alexander Spies ca3dc3a882
ESQL: Add `CEIL` function (#98847)
Add the unary scalar function CEIL.

Analogously to FLOOR,  it rounds up its argument.

- Implement CEIL, add it to the function registry and make sure it is serializable.
- Add csv tests, unit tests and docs.
- Add additional csv tests with different data types and some edge cases for both CEIL and FLOOR
- Add unit tests and update docs for FLOOR.
2023-08-28 12:31:56 +02:00
Nik Everett ff01fb680b
ESQL: Standardize font used in railroad diagrams (#98897)
Locks the railroad diagrams to always use the same font, this one named
`roboto mono`. This makes sure that when we render the railroad diagrams
we always size them the same way. Because everyone has a copy of roboto
mono. Because gradle resolves that dependency.
2023-08-26 14:19:47 -04:00
Nik Everett 649ceb74ab
ESQL docs: generate references for functions (#98856)
This generates a "railroad diagram" svg image that can be embedded into
the docs for any function to explain it's syntax. It's basic, but it's
something we can iterate on.

It also generates a table of supported types from the list of types that
we test. It can be included in the docs for reference as well.
2023-08-25 09:07:25 -04:00
Yang Wang f307e6fedd
[Docs] Document IP filtering for RCS 2.0 (#98553)
This PR adds documentation for RCS 2.0 IP filtering.

Relates: #98472
2023-08-24 23:23:40 -04:00
Abdon Pijpelink 1955bd8ad4
[DOCS] New docs for remote clusters using API key authentication (#98330)
* New docs structure for remote clusters

* Fix broken cross-book link errors

* More broken cross-book link errors

* Remove redirects for new pages

* Link to generic remote cluster docs instead

* Drop 'API' from the abbreviated title

* Add 'Establish trust with a remote cluster' section

* Restructure 'Establish trust' section into Prprequisite/local/remote instructions

* Add 'Configure roles and users' section

* Add 'Connect to a remote cluster' section

* Move version compatibility to prerequisites

* Fix test errors

* Incorporate review feedback

* Mention version 8.10 or later in the intro for API keys

* Add license prerequisite
2023-08-24 12:30:03 +02:00
Mary Gouseti b9b818e28e
Allow explain data stream lifecycle to accept a data stream. (#98811)
Currently the `GET target/_lifecycle/explain` API only works for
indices. In this PR we extend this behaviour to allow the target to be a
data stream so we can get the overview lifecycle status for all the
backing indices of a data stream.
2023-08-24 06:29:09 -04:00
Dianna Hohensee a25e176692
Add node "roles" to allocation explain response (#98550)
Report node "roles" in the /_cluster/allocation/explain response.
Nodes with limited sets of roles may affect shard distribution in ways
users did not originally consider, so it is helpful to surface this
information along with node allocation decision explanations.
2023-08-23 08:30:35 -04:00
István Zoltán Szabó 947128e76d
[DOCS] Fixes NOTE display error. (#98783) 2023-08-23 12:18:54 +02:00
Peter Dyson ef7b7ccded
[DOCS] mention closed indices are included by default for snapshot (#98766) 2023-08-23 10:41:35 +02:00
Lee Hinman 815d596daa
Add 'dataset' size to cat indices and cat shards (#98622)
* Add 'dataset' size to cat indices and cat shards

This adds the `dataset` computed size for the `/_cat/indices` and `/_cat/shards` APIs. This new
column is reported by default.

Resolves #95092
2023-08-22 15:36:32 -06:00
Nik Everett 65ea90d3fd
ESQL: LEAST and GREATEST functions (#98630)
Adds `LEAST` and `GREATEST` functions to find the min or max of the
values in many columns.
2023-08-22 14:15:04 -04:00
Bogdan Pintea 372458c9fd
ESQL: date_trunc(): swap order of arguments (#98624)
Swap arguments order so that the range parameter is first and datetime
one second, inline with other languages.
2023-08-22 18:20:05 +02:00
Andrei Dan 01ed7de99f
GA the data stream lifecycle (#98644)
This makes the data stream lifecycle generally available. This will allow
data streams to take advantage of a native simplified and resilient
lifecycle implementation.
2023-08-21 17:28:54 +01:00
Abdon Pijpelink 68aee20d01
[DOCS] Removing 'coming' admonition from 8.9.1 release notes (#98658) 2023-08-21 14:05:42 +02:00
Abdon Pijpelink 2bbc1df9bd
[DOCS] Remove 'coming' notice from 8.8.2 release notes (#98659) 2023-08-21 14:05:15 +02:00
Abdon Pijpelink d04c0f7976
Fix response for IS NULL (#98671)
The response shown for IS NULL here is actually the response for the IS NOT NULL snippet. This PR fixes that.
2023-08-21 13:20:36 +02:00
Abdon Pijpelink 4d7193d76d
[main] Update docs for v8.9.1 release (#98416) (#98655)
* Update docs for v8.9.1 release (#98416)

(cherry picked from commit 7985f8ef0f)

* Resolve merge conflicts

---------

Co-authored-by: Volodymyr Krasnikov <129072588+volodk85@users.noreply.github.com>
2023-08-21 10:53:39 +02:00
Nik Everett 44e61341f2
ESQL: COALESCE function (#98542)
This adds a `COALESCE` function that returns the first non-null value.
2023-08-17 13:51:44 -04:00
Roberto Seldner 79d2879564
Add deprecated note for `balanced` allocator (#98610)
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-08-17 12:50:52 -04:00
Nik Everett a380e8c369
ESQL: LTRIM, RTRIM and fix unicode whitespace (#98590)
Here we add support for the following two ESQL functions:
* LTRIM: remove leading spaces from a string
* RTRIM: remove trailing spaces from a string

We also fix an issue with the handling of unicode white spaces. We
make use of unicode code points to identify unicode whitespace
characters instead of relying on ASCII codes.

Moreover, iterating bytes in a Unicode string needs to consider
that some Unicode characters are encoded using multiple bytes.
2023-08-17 11:30:12 -04:00
Craig Taverner aad16b7d6b
Simple ESQL pow() docs fixes after re-reviewing (#98601) 2023-08-17 17:29:06 +02:00
Kathleen DeRusso 8c12a7b7cd
Query rules docs clarification (#98605)
* Query rules docs clarification

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc
2023-08-17 11:11:49 -04:00
Carlos Delgado 2b838ae853
Dense vector field types are indexed by default (#98268)
* First version

* Spotless, I liked my version better

* Fix param default values

* Add a supplier for default value to ensure it's calculated correctly

* Can't improve this without breaking tests

* Added checks for not specifying a body in PUT requests

* Fix default provider for enum params

* Added yaml test

* Changed docs and fix TODO

* Removing synonyms changes

* Added separate methods for providing default value as suppliers in enums

* Fixed test

* Add a supplier for default value to ensure it's calculated correctly

* Added checks for not specifying a body in PUT requests

* Remove synonyms changes

* Remove some supplier changes

* Better call enumParam with supplier version

* Fix compiler error on supplier

* Apply validators or requires depending on index version

* Solved BWC tests that involved using validators instead of requiresParameters

* Add tests

* Spotless

* Update docs/changelog/98268.yaml

* Update changelog

* Update docs/changelog/98268.yaml

* PR comments

* PR feedback

* Serialize index only for new index versions

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-08-17 10:53:14 -04:00
Craig Taverner dfe9bdc45f
Simple grammar fix for MVT docs (#98591) 2023-08-17 16:10:26 +02:00
ChrisHegarty 21dcb75836 Merge upstream 2023-08-17 11:40:42 +01:00
Simon Cooper 9538208fb7
Fix shard-stores doc test (#98581)
The replacement wasn't actually doing anything due to different JSON types
2023-08-17 11:38:31 +01:00
Nick Chow 5de0a9013f
Documentation update that fixes a query rules code example (#98540)
* Change example field in rule query guide

* Change fuzzy to contains to get tests to work

---------

Co-authored-by: Kathleen DeRusso <kathleen.derusso@elastic.co>
2023-08-16 15:14:32 -07:00
Andrei Stefan 014bd33f45
ESQL: replace the is_null function with IS NULL and IS NOT NULL predicates (#98412) 2023-08-16 20:19:40 +03:00
ChrisHegarty d7c0f623bf Merge upstream 2023-08-16 15:57:21 +01:00
Michael Peterson 4d3fb8d993 Bump to version 8.11.0 2023-08-16 10:35:00 -04:00
Kostas Krikellas b498ce9ff4
`Sqrt` function for ESQL (#98449)
* Sqrt function for ESQL

Introduces a unary scalar function for square root, which is a thin
wrapper over the Java.Math implementation.

* Fix area for ESQL integration changelog.

* Restore changelog.

* Restore area in changelog.
2023-08-16 16:33:30 +03:00
ChrisHegarty 107174051b Merge upstream 2023-08-16 08:56:40 +01:00
James Baiera 7d990d5a09
Allow custom geo ip database files to be downloaded (#97850)
This PR extends the assumptions we make about database file availability to all database file 
names instead of the default ones we host at Elastic. When creating a geo ip processor with 
a database name that is not recognized we unilaterally convert the processor to one that 
tags documents with a missing database message until the database file requested is 
downloaded or provided via the manual configuration route. This allows a pipeline to be 
created and for the download service to be started, potentially sourcing the needed files.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-08-16 00:31:51 -04:00
Yang Wang b337f9b6f3
[Docs] Misc doc update for RCS 2.0 (#98472)
This PR adds docs for the following items: * Remote indices privileges *
Remote cluster network settings * Remote cluster security settings * New
privileges * New response field for RemoteInfo API

List of preview pages: * [Remote indices in defining
roles](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/defining-roles.html#roles-remote-indices-priv)
* [Remote indices in PutRole
API](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-api-put-role.html#security-api-put-role-request-body)
* [Remote cluster server SSL
settings](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-settings.html#_remote_cluster_server_api_key_based_model_tlsssl_settings)
* [Remote cluster client SSL
settings](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-settings.html#_remote_cluster_client_api_key_based_model_tlsssl_settings)
* [Remote cluster network
settings](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/modules-network.html#remote-cluster-network-settings)
and
[here](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/modules-network.html#common-network-settings)
* [Remote cluster credentials
setting](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/remote-clusters-settings.html)
* [New
privileges](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/security-privileges.html)
* [New response field for RemoteInfo
API](https://elasticsearch_98472.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html#cluster-remote-info-api-response-body)
2023-08-15 20:11:21 -04:00
Jake Landis 80cc651614
Fix jwt and oidc doc (#97942)
This commit corrects the following issues with JWT and OIDC `jwkset_path` documentation:
* only https is supported for the JWT realm (OIDC support both https and http)
* JWT realm does not use a file watcher to reload the file every 5 seconds
* simplify "path" to  "file name" ..technically it is resolved path, but 99% of the time it will be just 
     a file name in the config directory and "path" is ambiguous
* remove special mention of using the absolute path in cloud. .. this is an unnecessary implementation 
     detail and the only setting (of many) that calls out the cloud config directly by absolute path
* ensure the 2 different JWT documentations are the same
* make mention of when the JWT file will be reloaded (it is not backed by the file watcher, only OIDC is)
2023-08-15 15:50:17 -05:00
amyjtechwriter 7e907f804a
[DOCS]Corrections for index-mgmt page. (#98481)
* Corrections for index-mgmt page.

* Update docs/reference/indices/index-mgmt.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-15 16:38:04 +01:00
Abdon Pijpelink e766050edc
[DOCS] Update geohash_grid agg field description (#98494) 2023-08-15 15:59:16 +02:00
Abdon Pijpelink b4ee955bb1
[DOCS] Add tests to behavioral analytics code snippets (#98378) 2023-08-15 10:10:37 +02:00
ChrisHegarty 8a4e42358b Merge upstream 2023-08-15 09:01:43 +01:00
Leaf-Lin db078f78dd
Update post-analytics-collection-event.asciidoc (#97826)
* Update post-analytics-collection-event.asciidoc

Update API endpoint. Instead of `click`, it should be `search_click`. 

Expanded on request body in the API as well.

* Update post-analytics-collection-event.asciidoc

* Update post-analytics-collection-event.asciidoc

* Update post-analytics-collection-event.asciidoc
2023-08-15 09:08:14 +10:00
ChrisHegarty 2e4440ff1c Remove space in dissect feature list 2023-08-14 14:54:37 +01:00
ChrisHegarty 7cb310b9d0 Merge upstream 2023-08-14 09:55:02 +01:00
Yang Wang d0f64941f0
Remove RCS 2.0 feature flag for beta release (#98307)
This PR removes the RCS 2.0 feature flag so that it is ready for beta
release.
2023-08-14 08:33:37 +10:00
Keith Massey b155444b95
Fixing data stream lifecycle documentation links that break clients (#98365) 2023-08-11 10:30:33 -05:00
Jim Ferenczi a5d21ce800
Add the total dense vector count in the indices stats output (#98275)
This change adds the total dense vector count to the output of the indices stats.
This is useful for observability in order to track the number of indexed vectors
in a cluster.

---------

Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
2023-08-11 23:17:38 +09:00
Abdon Pijpelink cac9eef000
[DOCS] Set up temporary redirects for new remote clusters docs (#98398) 2023-08-11 15:40:06 +02:00
Felix Barnsteiner c0f10b1cd2
[DOCS] ILM force merge action doesn't make index read-only (#98382) 2023-08-11 08:38:55 -04:00
ChrisHegarty d07492d712 Merge upstream 2023-08-11 12:10:23 +01:00
Mary Gouseti e71ea6e6d7
Add data stream lifecycle by default (#97823)
In this PR we enable all new data streams to be managed by the data
stream lifecycle by default. This is implemented by adding an empty
`lifecycle: {}` upon new data stream creation. 

Opting out is represented by a the `enabled` flag:

```
{
  "lifecycle": {
    "enabled": false
  }
}
```

This change has the following implications on when is an index managed
and by which feature:

| Parent data stream lifecycle| ILM| `prefer_ilm`|Managed by|
|----------------------------|----|----------------|-| | default | yes|
true| ILM| | default | yes| false| data stream lifecycle| |default |
no|true/false|data stream lifecycle| |opt-out or
missing|yes|true/false|ILM| |opt-out or missing|no|true/false|unmanaged|

Data streams that have been created before the data stream lifecycle is
enabled will not have the default lifecycle.

Next steps: - We need to document this when the feature will be GA
(https://github.com/elastic/elasticsearch/issues/97973).
2023-08-11 06:28:37 -04:00
James Rodewig c1eb581da8
[DOCS] Force merge doesn't mark index as read-only (#98357) (#98366)
(cherry picked from commit d4c6208727)

Co-authored-by: Gilad Gal <gilad.gal@elastic.co>
2023-08-10 18:28:52 -04:00
Carlos Delgado c596f121b4
Synonyms Overview Documentation (#98202) 2023-08-10 18:07:12 +02:00
Ioana Tagirta b2ba56a804
Search Applications: Remove inconsistent indices warning (#98348)
* Remove inconsistent indices warning

* Revert docs changes for inconsistent indices warning
2023-08-10 16:14:08 +02:00
Abdon Pijpelink 21ef4f3629
[DOCS] Update CCS compatibility matrix for 8.10 (#98341) 2023-08-10 15:57:47 +02:00
Keith Massey 841050043e
Hiding data stream lifecycle documentation in released docs (#98334) 2023-08-10 08:18:05 -05:00
Chris Hegarty c300712dfe
Remove docs workaround (#98346)
This commit removes a temporary workaround that was added for the doc root.
2023-08-10 13:54:04 +01:00
Luca Cavanna 4023454483
Introduce executor for concurrent search (#98204)
This commit enables concurrent search execution in the DFS phase, which is going to improve resource usage as well as performance of knn queries which benefit from both concurrent rewrite and collection.

We will enable concurrent execution for the query phase in a subsequent commit. While this commit does not introduce parallelism for the query phase, it introduces offloading sequential computation to the newly introduced executor. This is true both for situations where a single slice needs to be searched, as well as scenarios where a specific request does not support concurrency (currently only DFS phase does regardless of the request). Sequential collection is not offloaded only if the request includes aggregations that don't support offloading: composite, nested and cardinality as their post collection method must be executed in the same thread as the collection or we'll trip a lucene assertion that verifies that doc_values are pulled and consumed from the same thread.

## Technical details

This commit introduces a secondary executor, used exclusively to execute the concurrent bits of search. The search threads are still the ones that coordinate the search (where the caller search will originate from), but the actual work will be offloaded to the newly introduced executor.

We are offloading not only parallel execution but also sequential execution, to make the workload more predictable, as it would be surprising to have bits of search executed in either of the two thread pools. Also, that would introduce the possibility to suddenly run a higher amount of heavy operations overall (some in the caller thread and some in the separate threads), which could overload the system as well as make sizing of thread pools more difficult.

Note that fetch, together with other actions,  is still executed in the search thread pool. This commit does not make the search thread pool merely a coordinating only thread pool, It does so only for what concerns the IndexSearcher#search operation itself, which is though a big portion of the different phases of search API execution.

Given that the searcher blocks waiting for all tasks to be completed, we take a simple approach of introducing a thread pool executor that has the same size as the existing search thread pool but relies on an unbounded queue. This simplifies handling of thread pool queue and rejections. In fact, we'd like to guarantee that the secondary thread pool won't reject, and delegate queuing entirely to the search thread pool which is the entry point for every search operation anyway. The principle behind this is that if you got a slot in the search thread pool, you should be able to complete your search, and rather quickly.

As part of this commit we are also introducing the ability to cancel tasks that have not started yet, so that if any task throws an exception, other tasks are prevented from starting needless computation.

Relates to #80693
Relates to #90700
2023-08-10 12:40:36 +02:00
ChrisHegarty 1e53a5346a Merge branch 'main' into feature/esql 2023-08-10 11:35:15 +01:00
Ed Savage 3682a88199
[ML] Update documentation regarding versioning. (#98320)
Update the ml and transform reference documentation to provide information regarding the new versioning schemes independent from the product versions.

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2023-08-10 11:20:58 +01:00
Martijn van Groningen 297a0134ce
Add tsdb metrics builtin component template (#97602)
Fleet is currently hard coded to set index.codec to best_compression (deflate compression). This is good for most data streams, except for data streams were tsdb is enabled. Ideally Fleet doesn't need to set this setting at all and Elasticsearch's default would be good. But unfortunately this isn't the case. It default to default (lz4 - optimised for speed), which in would mean much higher disk space usage. Ideally the default would be default when synthetic source is enabled and otherwise best_compression. Changing this now, would mean a breaking change.

Instead Fleet like to depend on Elasticsearch's internal component templates. To at least abstract some of the internal details away. The metrics-settings is ok for non tsdb, but there is no component template for tsdb metrics. This PR adds this.

Relates to elastic/kibana#160288
2023-08-10 16:19:06 +07:00
Kuni Sen 225503a447
Update field-mapping.asciidoc that Epoch format is not supported as dynamic date format (#98338)
* Update field-mapping.asciidoc that Epoch format is not supported as dynamic date format

Update field-mapping.asciidoc that Epoch format is not supported as dynamic date format

* Update docs/reference/mapping/dynamic/field-mapping.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-10 16:44:44 +09:00
Stef Nestor 93d36db454
[DOC+] ILM min_age interpretation (#98245)
* [DOC+] ILM min_age interpretation

👋 hiya, team!

From the time y'all helped me write this [ILM Troubleshooting blog](https://www.elastic.co/blog/troubleshooting-elasticsearch-ilm-common-issues-and-fixes) in 2021 and we later ported errors to [this doc](https://www.elastic.co/guide/en/elasticsearch/reference/master/index-lifecycle-error-handling.html) via https://github.com/elastic/elasticsearch/issues/75849, the remaining top-gotcha user's raise is "Common issue 3" that ILM's `min_age` calculates off rollover time fallback index creation time.

This PR cross-pollinates the blog quote into the docs so that Support can link it to users and so it becomes Google-able.

> Common issue 3: min_age calculation clarification
> When working with customers, I have seen confusion about how min_age works. The min_age must increase between subsequent phases. If rollover is used, min_age is calculated off the rollover date. This is because rollover generates a new index and the new index’s creation date is used in the calculation. Otherwise, min_age is calculated off the original index’s creation date.

* Apply suggestions from code review

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-09 16:41:49 +02:00
Abdon Pijpelink e009e40660
[DOCS] Fix HDR parameter for the percentile agg (#98318) 2023-08-09 14:38:53 +02:00
Abdon Pijpelink 8ac9fef3b7
[DOCS] Add 'boost' paramater to match query (#98108) 2023-08-09 14:28:27 +02:00
Kathleen DeRusso 0437416c33
Tech debt: Add tests to documentation for query rules, search applications (#98266)
* Add tests for query rules

* More tests

* Fix search app tests

* Fix tests

* Add teardown to tests

* Add tests for list search apps call

* Update test in get search application

* Tweak stack trace

* Make response match in test

---------

Co-authored-by: carlosdelest <carlos.delgado@elastic.co>
2023-08-09 08:01:52 -04:00
Carlos Delgado 727d0fad02
Synonyms bugfix - prevent index not found when system index has not been created (#98280) 2023-08-09 08:55:20 +02:00
Abdon Pijpelink 0dd92f17a7 Merge pull request ESQL-1552 from abdonpijpelink/docs-tech-preview-admonition
[DOCS] Mark ES|QL as 'tech preview' and update supported types list
2023-08-08 19:26:34 +02:00
elasticsearchmachine 3ccdab8da4 Merge pull request ESQL-1553 from elastic/main
🤖 ESQL: Merge upstream
2023-08-08 13:19:23 -04:00
Abdon Pijpelink 0c14d5d332 Update types list 2023-08-08 18:11:59 +02:00
Salvatore Campagna d0b2f650df
Enable all remaining metric aggregations on counters (#97974)
Here we enable aggregations previously not allowed on fields of type counter.
The decision of enabling such aggregations even if the result is "meaningless"
for counters has been taken to favour TSDB adoption.

Aggregations now allowed, other than the existing ones, include:
* avg
* box plot
* cardinality
* extended stats
* median absolute deviation
* percentile ranks
* percentiles
* stats
* sum
* value count

I included tests for the weighted average and matrix stats aggregations too.

Resolves #97882
2023-08-08 17:47:47 +02:00
Abdon Pijpelink 47566f4276 Update supported types list 2023-08-08 17:47:45 +02:00
Abdon Pijpelink 843eacab27 Add tech preview admonition 2023-08-08 17:29:24 +02:00
Kathleen DeRusso 93dd279dea
Docs: Link to search with query rules page from query rules DSL (#98269)
* Link to search with query rules page from query rules DSL

* Update docs/reference/query-dsl/rule-query.asciidoc

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

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2023-08-08 08:50:53 -04:00
David Turner 0f6a217ed8
Fix admonition about initial_master_nodes (#98242)
Admonition paragraphs cannot be combined with a `+` continuation mark.
This commit fixes the formatting by using an admonition block instead.
2023-08-08 11:50:36 +01:00
David Turner 847ec45baa
Remove bound on SEARCH_COORDINATION default size (#98264)
Today by default the `SEARCH_COORDINATION` pool is sized at half the
allocated processors, or five if there are more than ten CPUs. Yet, if
we scale up a node to have more than ten CPUs, we probably want to scale
up the number of search coordination threads to match. This commit
removes the limit of five threads.
2023-08-08 07:09:25 +01:00
elasticsearchmachine 9d1e4bcc2a Merge pull request ESQL-1546 from elastic/main
🤖 ESQL: Merge upstream
2023-08-07 13:27:50 -04:00
Michael Peterson 169f7d1774
Add specific cluster error info, shard info and additional metadata for CCS when minimizing roundtrips (#97731)
For CCS searches with ccs_minimize_roundtrips=true, when an error is returned, it is unclear which cluster
caused the problem. This commit adds additional accounting and error information to the search response
for each cluster involved in a cross-cluster search.

The _clusters section of the SearchResponse has a new details section added with an entry for each cluster
(remote and local). It includes status info, shard accounting counters and error information that are added
incrementally as the search happens.

The search on each cluster can be in one of 5 states:
RUNNING
SUCCESSFUL - all shards were successfully searched (successful or skipped)
PARTIAL - some shard searches failed, but at least one succeeded and partial data has been returned
SKIPPED - no shards were successfully searched (all failed or cluster unavailable) when skip_unavailable=true
FAILED - no shards were successfully searched (all failed or cluster unavailable) when skip_unavailable=false

A new SearchResponse.Cluster object has been added. Each TransportSearchAction.CCSActionListener
(one for each cluster) has a reference to a separate Cluster instance and updates once it gets back 
information from its cluster.

The SearchResponse.Clusters object only uses the new Cluster object for CCS minimize_roundtrips=true.
For local-only searches and CCS minimize_roundtrips=false, it uses the current  Clusters object as before.

Follow on work will change CCS minimize_roundtrips=false to also use the new Cluster model and update
state in the _cluster/details section.

The Cluster objects are immutable, so a CAS operation is required to swap in new state to the 
map of Cluster objects held by the `SearchResponse.Clusters` class. This concurrency model is 
a little bit of overkill for the minimize_roundtrips=true use case, but it will be necessary for 
supporting minimize_roundtrips=false, since updates there will be done per shard, not per cluster.
2023-08-07 12:32:06 -04:00
Kathleen DeRusso 4367c3f31c
Add query rulesets counts to enterprise search telemetry (#98071) 2023-08-07 10:38:12 -04:00
Abdon Pijpelink 2f320f1bf6
Revert "Revert "[DOCS] Add docs for EQL missing events"" (#98029)
* Revert "Revert "[DOCS] Add docs for EQL missing events (#97372)" (#98028)"

This reverts commit 46c81938d9.

* Changed response for missing events
2023-08-07 15:19:08 +02:00
Abdon Pijpelink 962c607ade
[DOCS] Fix formatting issue in cardinality-aggregation.asciidoc (#98175)
* [DOCS] Fix formatting issue in cardinality-aggregation.asciidoc

Fixes a header not rendering properly because of a missing newline.

* Update docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc

* More issues

* More issues

* Update docs/reference/aggregations/metrics/cardinality-aggregation.asciidoc

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

---------

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-08-07 10:38:45 +02:00
elasticsearchmachine 1fdccf3554 Merge pull request ESQL-1543 from elastic/main
🤖 ESQL: Merge upstream
2023-08-05 01:22:58 -04:00
David Kilfoyle 174ea9645c
[Docs] Fix links to Cloud snapshot and restore docs (#98228) 2023-08-04 18:01:46 -04:00
David Kilfoyle 4d3069a986
Fix broken links to Cloud snapshot restore info (#98213) 2023-08-04 16:38:27 -04:00
elasticsearchmachine f22804abea Merge pull request ESQL-1542 from elastic/main
🤖 ESQL: Merge upstream
2023-08-04 13:17:09 -04:00
Carlos Delgado 8e64359fb1
Change cluster stats synonyms keys (#98126) 2023-08-04 17:28:12 +02:00
Abdon Pijpelink 91d0e11ab9
[DOCS] Update manual downsampling documentation to use TSDS (#97976)
* [DOCS] Update manual downsampling documentation to use TSDS

* Swap manual and ILM downsampling examples in nav

* Typo

* Update prerequisites based on review feedback

* Warn against deleting the old backing index.

* Clarify counter/gauge results

* Mention that the downsampled type is 'aggregate_metric_double'
2023-08-04 09:39:14 +02:00
elasticsearchmachine 85dd9719fc Merge pull request ESQL-1536 from elastic/main
🤖 ESQL: Merge upstream
2023-08-04 01:20:52 -04:00
James Rodewig e00b354c26
[DOCS] Remove breaking change tags (#98144)
With https://github.com/elastic/stack-docs/pull/2495 merged, we no longer reuse breaking changes in the Stack Install/Upgrade guide.

This removes the related `notable-breaking-changes[]` tags from the 8.9+ docs and updates the RN generator template.

## Out of scope
With the removal of these tags, we may no longer need the `notable` property for changelog entries and can likely simplify the logic for the [BreakingChangesGenerator](https://github.com/elastic/elasticsearch/blob/main/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release/BreakingChangesGenerator.java). Updating those files is outside the scope of this PR. I've opened https://github.com/elastic/elasticsearch/issues/98145 to track that work.
2023-08-03 15:23:47 -04:00
Mayya Sharipova 2076183dee
Move vectors of > 1024 dims out of experimental (#96850)
With moving max dims check to codec from Lucene 9.8, we will always
have a way to provide our own codec with the max dims
defined by us.
2023-08-03 14:30:14 -04:00
elasticsearchmachine 6ff458b3bf Merge pull request ESQL-1530 from elastic/main
🤖 ESQL: Merge upstream
2023-08-03 13:23:09 -04:00
Abdon Pijpelink 5947f3b455
[DOCS] Clarify TSDS/synthetic source/runtime field restrictions (#97980) 2023-08-03 18:28:08 +02:00
Abdon Pijpelink efc0cb5422
[DOCS] Node stats API: fix descriptions of 'cache_size' and 'cache_count' (#98092) 2023-08-03 09:45:22 +02:00
elasticsearchmachine 04908b9e15 Merge pull request ESQL-1527 from elastic/main
🤖 ESQL: Merge upstream
2023-08-03 01:18:46 -04:00
Kathleen DeRusso 23e35d5687
[Query Rules] Add documentation for rule_query (#97667)
* Add docs for rule query

* Add test

* Fix formatting in rule query dsl

* Remove query string as required from rule query docs

* PR feedback

* Update with API changes

* Expand and clarify 'search using query rules' doc

* Clean up wording

* Update put syntax

* Fix examples after refactor

* Update docs/reference/query-dsl/rule-query.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

* PR feedback + update privilege

* PR feedback

* More PR feedback

* Small correction

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-02 15:56:06 -04:00
Nik Everett 24b2d16f95 Add `to_degrees` and `to_radians` functions (ESQL-1496)
This adds the `to_degrees` and `to_radians` functions. It uses the
"convert" function framework because that just felt right - these
convert between radians and degrees after all.
2023-08-03 04:23:15 +10:00
elasticsearchmachine 5bc6ae21ba Merge pull request ESQL-1525 from elastic/main
🤖 ESQL: Merge upstream
2023-08-02 13:17:36 -04:00
Nik Everett c1601f5a9c Add remaining trigonometric functions (ESQL-1518)
Adds the remaining trigonomentric functions, `ACOS`, `ASIN`, `ATAN`, and
`ATAN2`.

---------

Co-authored-by: Bogdan Pintea <pintea@mailbox.org>
2023-08-03 01:12:10 +10:00
Abdon Pijpelink 5ba98c569e
[DOCS] Skip testing the response of EQL sequence sample requests (#98112) 2023-08-02 15:58:52 +02:00
Carlos Delgado e300319afb
Synonym Rules APIs docs (#98064) 2023-08-02 14:11:30 +02:00
Ioana Tagirta f3d0073066
Search Applications: remove indices array and rely on alias (#98036)
* Stop returning the indices list for GET search app

* Stop returning the indices list for the list search app API

* Stop storing indices list

* Remove indices from system index mapping

* Check for alias in PUT rest tests

* Documentation changes

* Do not check for alias existence since we are already doing get alias
2023-08-02 10:00:39 +02:00
Nik Everett 7c30146858 Add query to esql task (ESQL-1511)
This adds the `query` to the main ESQL task so you can see long running
queries. And adds some docs about it including an example of cancelling
a query.

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-02 05:30:36 +10:00
Nik Everett c44a245cae Add trigonometric functions (ESQL-1513)
This adds `SIN`, `COS`, `TAN`, `SINH`, `COSH`, and `TANH` functions.

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-01 14:36:55 -04:00
elasticsearchmachine 593849aea3 Merge pull request ESQL-1517 from elastic/main
🤖 ESQL: Merge upstream
2023-08-01 13:17:51 -04:00
Abdon Pijpelink 42cc99f204
[DOCS] Remove 'settings' from resume follower API (#98086) 2023-08-01 12:51:39 +02:00
Carlos Delgado 970685321f
Synonyms APIs - Synonyms Sets documentation (#98015) 2023-08-01 11:17:50 +02:00
Abdon Pijpelink 6993a6d74e
[DOCS] Update ramge aggregation example (#98059) 2023-08-01 09:35:07 +02:00
Nik Everett 6c87075564 Support `auto_bucket` for numeric fields (ESQL-1494)
This adds support for numeric fields to `auto_bucket` and adds a new
`floor` function to round numeric down to the nearest integer. That
function is exposed because it's probably useful. I added it in this PR
because `auto_bucket` uses it as an implementation detail as well.
2023-07-31 16:45:59 -04:00
elasticsearchmachine bcefcd916c Merge pull request ESQL-1510 from elastic/main
🤖 ESQL: Merge upstream
2023-07-31 13:16:08 -04:00
Mary Gouseti 09d396a91f
Change test tear down to only remove resources created by the test (#98060) 2023-07-31 17:23:37 +03:00
Michael Peterson 50b1749bca
Allow excluding a cluster from a CCS search using minus sign in multi-target syntax (#97865)
Elasticsearch multi-target syntax for indices allows excluding an index with the "-" sign.
Public docs: https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-multi-index

This commit expands that functionality to index expressions that include a cluster alias.

For example:
POST logs*,*:logs*,-remote4:*,-remote1*:*/_async_search

Would result in search all remote clusters except for remote4 and remote1, remote11, remote12, remote13, etc..

A singleton wildcard is required in the index position of the `cluster:index`,
to specify that we are excluding the entire cluster. This is useful when a cluster
is down or slow during CCS searches.

Excluding a subset of indexes on a remote cluster is not supported in this commit.
For example, this will throw an error:
POST logs*,*:logs*,-remote4:logs*/_async_search
2023-07-31 09:36:56 -04:00
Abdon Pijpelink 46c81938d9
Revert "[DOCS] Add docs for EQL missing events (#97372)" (#98028)
This reverts commit 950c0b415a.
2023-07-28 11:57:13 +02:00
Abdon Pijpelink 950c0b415a
[DOCS] Add docs for EQL missing events (#97372) 2023-07-28 10:58:41 +02:00
elasticsearchmachine 3cb4b169ca Merge pull request ESQL-1490 from elastic/main
🤖 ESQL: Merge upstream
2023-07-28 01:17:30 -04:00
Kathleen DeRusso 8537146813
[Query Rules] Extend match types (#97730) 2023-07-27 16:39:40 -04:00
Carlos Delgado c0a99baef5
Add synonyms sets information to cluster stats (#97900) 2023-07-27 21:25:24 +02:00
elasticsearchmachine 923f86e932 Merge pull request ESQL-1489 from elastic/main
🤖 ESQL: Merge upstream
2023-07-27 13:15:21 -04:00
Jill Guyonnet 1a254c2f08
[Fleet] Fix Fleet API docs (#97981) 2023-07-27 17:22:44 +02:00
Mary Gouseti 45e056ba04
Ignore `total_shards_per_node` setting on searchable snapshots in frozen (#97979)
When ILM is mounting a searchable snapshot in the frozen tier, we chose to ignore the `total_shards_per_node` setting because it's very likely to block shards from being assigned. Usually the `total_shards_per_node` is configured for one of the previous tiers that have usually more nodes than the frozen tier.
2023-07-27 13:06:14 +03:00
elasticsearchmachine 4178416188 Merge pull request ESQL-1485 from elastic/main
🤖 ESQL: Merge upstream
2023-07-26 13:27:34 -04:00
Pooya Salehi 966eb022d9
[DOCS] Mention mmap and FD limits when increasing default max shard per node (#97975) 2023-07-26 16:45:27 +02:00
Abdon Pijpelink ac8f76d932
[DOCS] Remove erroneous entries from 8.9.0 release notes (#97963)
* [DOCS] Remove erroneous entries from 8.9.0 release notes

* Remove 'coming in 8.9.0' admonition
2023-07-26 16:24:43 +02:00
Craig Taverner ac710bae1f Merge pull request ESQL-1439 from craigtaverner/esql/pow_unsigned_long
pow unsigned long
2023-07-26 12:15:33 +02:00
Lisa Cawley c2206ce74f
[DOCS] Removing coming 8.9.0 phrase (#97943) 2023-07-26 09:57:35 +02:00
elasticsearchmachine 659931a947 Merge pull request ESQL-1475 from elastic/main
🤖 ESQL: Merge upstream
2023-07-25 13:16:39 -04:00
Ryan Ernst 97d19a3881
Add release notes for 8.9.0 release (#97061) (#97931)
Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: David Kyle <david.kyle@elastic.co>
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-07-25 07:00:03 -07:00
Bogdan Pintea fa8b34cb88 Change `RENAME`'s syntax from using `=` to `AS` (ESQL-1462)
This changes the `RENAME` syntax from `RENAME new = old` to `RENAME old
AS new`.

Fixes ESQL-1447.
2023-07-25 12:26:35 +02:00
Bogdan Pintea 5aa1feb63f Add `_query` endpoint as `_esql` replacement (ESQL-1463)
This adds a new ES|QL endpoint, `_query`, to replace the now deprecated
`_esql`. The latter is still kept for a while, emitting a deprecation
warning.

Fixes ESQL-1379.
2023-07-25 12:25:38 +02:00
elasticsearchmachine 0db22ffc28 Merge pull request ESQL-1471 from elastic/main
🤖 ESQL: Merge upstream
2023-07-25 01:20:53 -04:00
Ryan Ernst afca9a8950
Forward port release notes for 8.8.2 release (#97058) (#97908) 2023-07-24 17:22:54 -07:00
elasticsearchmachine f24b47af46 Merge pull request ESQL-1470 from elastic/main
🤖 ESQL: Merge upstream
2023-07-24 13:18:04 -04:00
Craig Taverner 9e566c9068 Update docs/reference/esql/functions/pow.asciidoc
Co-authored-by: Bogdan Pintea <pintea@mailbox.org>
2023-07-24 15:50:13 +02:00
Abdon Pijpelink 48b3a85741
[DOCS] Update RRF tech preview statement (#97851)
* [DOCS] Update RRF tech preview statement

* Add 'rank' and 'sub_searches'
2023-07-24 13:55:06 +02:00
Jeffrey Chu 7797e27689
Update cpu-usage.asciidoc (#97883)
In 8.8.2, Column `name` contains the node name, instead of column `node`
2023-07-24 13:47:06 +02:00
amyjtechwriter a80d9cb289
Index Management now has link to Discover in UI. (#96326)
* Index Management now has link to Discover in UI.

* updating screenshot for data streams section

* Update docs/reference/indices/index-mgmt.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

* Update docs/reference/indices/index-mgmt.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-07-24 12:31:15 +01:00
Abdon Pijpelink 8469883198
[DOCS] Make it clear that "both" is not a valid value for "script.allowed_types" (#97837) 2023-07-24 10:20:57 +02:00
Marantidis Kiriakos ea42c2e076
boxplot support for transform 52189 (#96515) 2023-07-24 10:11:26 +02:00
elasticsearchmachine dd29c18bd1 Merge pull request ESQL-1466 from elastic/main
🤖 ESQL: Merge upstream
2023-07-20 13:18:14 -04:00
Craig Taverner 75ea3ab3cd Numerical overflow should result in `null` and a warning
To implement this we:

* Cast both arguments to double
* Perform integer and long validation on the double results before casting back to integer or long
* Perform a special case validation for exponent==1
* Any validation failures result in ArithmeticException, which is caught and added to warnings
2023-07-20 19:03:29 +02:00
David Turner 60935c68cc
Adjust sizing guidance re. doc count (#97831)
In #87246 we describe some reasons why it's a good idea to limit the doc
count of a shard, and we started to do so in #94065, so this commit
adjusts the sizing guidance docs to match.
2023-07-20 14:56:52 +01:00
Abdon Pijpelink e3c11016b9
[DOCS] Add tech preview admonition for geo line aggs on time-series data (#97844)
* Add tech preview admonition for time-series data

* Light editing
2023-07-20 15:40:12 +02:00
Iraklis Psaroudakis 3f9279df17
Mute testResetSystemIndices and feature-migration (#97781)
Relates #97780
2023-07-20 07:30:48 -04:00
Craig Taverner 925bdf49a8 Improve documentation for pow function and refined type rules 2023-07-20 11:32:09 +02:00
Abdon Pijpelink 40409bf8ca
[DOCS] Semantic search page (#97715)
Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
Co-authored-by: David Roberts <dave.roberts@elastic.co>
2023-07-20 10:45:13 +02:00
elasticsearchmachine db206f8e7d Merge pull request ESQL-1461 from elastic/main
🤖 ESQL: Merge upstream
2023-07-20 01:15:59 -04:00
David Turner c7c1dc1914
Add docs on troubleshooting NFS repos (#97601)
Spell out a bit more clearly that ES works through the OS's filesystem
abstraction, giving advice about how to reproduce problems outside of
ES.
2023-07-19 13:55:09 +01:00
Ioana Tagirta d2685926f3
Document dictionary parameter for Search Applications (#97501)
* Document dictionary parameter for Search Applications

* Address PR feedback
2023-07-19 14:26:16 +02:00
Luigi Dell'Aquila 95d9fd75ed Add date_extract function (ESQL-1346) 2023-07-19 14:08:06 +02:00
István Zoltán Szabó 3fd94678e6
[DOCS] Adds important admonition to handling delayed data page (#97753) 2023-07-19 13:32:06 +02:00
István Zoltán Szabó 57fd6b84fb
[DOCS] Expands ELSER tutorial with optimization info (#97392)
Co-authored-by: David Kyle <david.kyle@elastic.co>
2023-07-19 10:38:11 +02:00
elasticsearchmachine 7362abb3d7 Merge pull request ESQL-1455 from elastic/main
🤖 ESQL: Merge upstream
2023-07-18 13:18:42 -04:00
Ryan Ernst 3f8f7182be
Remove index version and transport version from main endpoint response (#97675)
The index and transport versions are low level details of how a node
behaves in a cluster. They were recently added to the main endpoint
response, but they are too low level and should be moved to another
endpoint TBD.

This commit removes those versions from the main endpoint response. Due
to the fact lucene version is now derived from index version, this
commit also adds an explicit lucene version member to the main response.
2023-07-18 06:36:46 -07:00
Chris Hegarty 8aee1673af
Add tags (#97751)
This is a very minor change that adds tags to a couple of aggs docs. These tags are currently unused, but will be referred to by ESQL docs.
2023-07-18 13:48:37 +01:00
Mary Gouseti 9aed799b51
HealthPeriodicLogger disabled by default (#97722)
Co-authored-by: Matt Culbreth <matt.culbreth@elastic.co>
2023-07-18 10:18:23 +03:00
elasticsearchmachine 8c1b161bf7 Merge pull request ESQL-1449 from elastic/main
🤖 ESQL: Merge upstream
2023-07-17 13:23:01 -04:00
David Kyle 85cb7e28f2
Mute DocsClientYamlTestSuiteIT test {yaml=reference/eql/eql/line_338} (#97717) 2023-07-17 14:20:25 +01:00
Michael Peterson eaa86796a7
Add completion_time time field to async_search get and status response (#97700)
The completion_time is set as the start_time (already present) plus the 'took'
time that is set in the SearchResponse object and only if the isRunning status == false
since took is set even for in-progress searches.

We use the 'took' field because it is based on relative time, not absolute wall clock time
which can go backwards due to NTP issues. See the comments in TransportSearchAction about
the SearchTimeProvider for details.

Closes #88640
2023-07-17 09:13:15 -04:00
Andrei Dan 22bc45a82f
Change default value for data stream lifecycle poll interval to 5 mins (#97583) 2023-07-17 06:52:45 -04:00
Mayya Sharipova f8c626f792
Track max_score in collapse when requested (#97703)
Before we used to track max_score in collapse when requested (track_scores=true)
or when there is no sort in collapse (see PR#27122). But this feature
was lost through refactoring and changes.

This PR restores this feature.

Closes #97653
2023-07-17 06:48:00 -04:00
elasticsearchmachine 3201f20f8b Merge pull request ESQL-1443 from elastic/main
🤖 ESQL: Merge upstream
2023-07-14 13:17:42 -04:00
Martijn van Groningen d5ddc868f6
Document ILM's implicit rollover. (#97685)
This was introduced via #94065
Relates to #87246
2023-07-14 17:29:59 +02:00
elasticsearchmachine 850139a946 Merge pull request ESQL-1435 from elastic/main
🤖 ESQL: Merge upstream
2023-07-13 13:18:20 -04:00
Martijn van Groningen bea09c004e
Explain tsdb counters better. (#97618) 2023-07-13 17:15:17 +02:00
Abdon Pijpelink 0f810b19e9
[DOCS] Clarify that dense vectors can be created with ES (#97636)
* [DOCS] Clarify that dense vectors can be created with ES

* Fix rendering issue

* Break up long sentence
2023-07-13 14:04:32 +02:00
Jean-Fabrice Bobo 8f2760628f
Update filtering.asciidoc (#97542) 2023-07-13 14:01:12 +02:00
Abdon Pijpelink a9b3d7ada7
[DOCS] Clarify that disk impact of TSDS varies per data set (#97571) 2023-07-13 10:14:09 +02:00
elasticsearchmachine f00a6219d1 Merge pull request ESQL-1428 from elastic/main
🤖 ESQL: Merge upstream
2023-07-12 13:21:28 -04:00
István Zoltán Szabó 9cd609f22c
[DOCS] Adds deployment_id as an option to query_vector_builder (#97576) 2023-07-12 09:35:36 +02:00
David Roberts e810d7b77b
[ML] `inference_config` is optional for the infer trained model API (#97464)
It was made optional in #92359 which was released in version 8.6.1,
but the docs weren't updated to reflect this.
2023-07-12 08:35:06 +01:00
elasticsearchmachine 121ec848e6 Merge pull request ESQL-1421 from elastic/main
🤖 ESQL: Merge upstream
2023-07-12 01:20:30 -04:00
Kathleen DeRusso 9ee32c4cc8
Add documentation for query rules CRUD APIs (#97524)
Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-07-11 14:49:40 -04:00
Max Hniebergall 3a4113801c
[NLP] Support the different mask tokens used by NLP models for Fill Mask (#97453)
Add mask_token field to fill_mask of _ml/trained_models.

This change will enable users and Kibana to get the particular mask tokens needed for deployed models by adding a mask_token field to the GET _ml/trained_models API, as an enhancement to support kibana#159577.
2023-07-11 14:42:44 -04:00
elasticsearchmachine e8f4d5e938 Merge pull request ESQL-1418 from elastic/main
🤖 ESQL: Merge upstream
2023-07-11 13:18:22 -04:00
Jack Conradson f2b0434ee2
Mark rank and sub_searches as tech preview (#97573)
rank and sub_searches are in tech preview. This adds the tech preview text that is required in the docs for these features.
2023-07-11 09:28:46 -07:00
Marc-Antoine Leclercq b1d150babf
Fix typo on semantic-search-elser.asciidoc (#97551)
MACRO => MARCO
2023-07-11 11:52:26 +02:00
Luca Cavanna 7df388df64
Make terminate_after early termination friendly (#97540)
There are situations in which the terminate_after functionality causes
the collection to keep on going although there is nothing to collect,
with the only goal of incrementing the counter of collected docs and
eventually early terminating which sets the `terminated_early` flag
in the search response to true.

When docs collection early terminates, we should rather honor the
corresponding `CollectionTerminatedException` that is thrown, and
adjust expectations around the fact that `terminate_after` affects
actual collection of documents, meaning that it can't be honored if
the threshold has not been reached by the team the collection early
terminates for other reasons.

This commit adjust the QueryPhaseCollector behavior to do that, which
allows for some additional simplifications.

Closes #97269
2023-07-11 10:14:12 +02:00
Ievgen Degtiarenko bd7c0f55e5
Add `shard_stats.total_count` column description to /_cat/nodes docs. (#97549)
This column was implemented previously but not added to the docs. It might be
helpful to list it when troubleshooting cluster balance.
2023-07-11 10:09:04 +02:00
Abdon Pijpelink d204de411b Merge pull request ESQL-1393 from abdonpijpelink/es-pipe-ql
[DOCS] Change ESQL into ES|QL and other docs improvements
2023-07-11 10:07:18 +02:00
David Turner ddd4ba5e30
Fix docs for explaining unassigned shards (#97538)
Today the `current_node` parameter is given in several sample requests
illustrating how to explain an unassigned shard using the cluster
allocation explain API. This doesn't make sense, an unassigned shard has
no `current_node`. This commit removes the misleading parameter in these
cases.
2023-07-11 08:01:12 +01:00
elasticsearchmachine 46a2cab5f2 Merge pull request ESQL-1407 from elastic/main
🤖 ESQL: Merge upstream
2023-07-10 13:21:21 -04:00
Michael Peterson 6dd1841dbc
Allow users to run the painless execute API on a remote cluster shard (#97335)
Added a clusterAlias to the Painless execute Request object, so that index
expressions in the request of the form "myremote:myindex" will be parsed to
set clusterAlias to "myremote" and the index to "myindex".

If clusterAlias is null, then it is executed against a shard on the local cluster, as before.
If clusterAlias is non-null, then the SingleShardTransportAction is sent to the remote cluster,
where it will run the full request (doing remote coordination). Note that the new clusterAlias 
field is not Writeable so that when it is sent to the remote cluster it will only see the index
name, not the clusterAlias (which it wouldn't know how to handle correctly).

Added PainlessExecuteIT test that tests cross-cluster calls

Updated painless-execute-script end user docs to indicate support for cross-cluster executions
2023-07-10 12:27:00 -04:00
Martijn van Groningen 467a2b77a0 Merge remote-tracking branch 'es/esql/lang' into string_trim 2023-07-10 14:51:10 +02:00
David Turner ac0c316764
Add note on troubleshooting laggy cancellations (#97485)
Today we document that tasks may not react to cancellations immediately,
but in practice it's surprising to users and kind of a bug if they run
for too long after being cancelled. This commit adds a little extra
detail about the information to collect to troubleshoot such a
situation.
2023-07-10 11:52:36 +01:00
Christoph Büscher 192597d795
Limit _terms_enum prefix size (#97488)
Currently the prefix size of the _terms_enum endpoint are not limited in size.
Since they run against a keyword field and build automata, this can lead to high memory
consumption and the danger of running OOM. This change check the size of the prefix
early in the rest request and throw a validation error in case it exceeds
IndexWriter.MAX_TERM_LENGTH, which is the same limit we apply to the length of
keyword field values anyway, so this comes at no loss in functionality.

Closes #96572
2023-07-10 12:21:07 +02:00
David Turner 09e53f9ad9
Enhance docs around network troubleshooting (#97305)
Discovery, like cluster membership, can also be affected by network-like
issues (e.g. GC/VM pauses, dropped packets and blocked threads) so this
commit duplicates the troubleshooting info across both places.
2023-07-10 10:57:44 +01:00
Abdon Pijpelink a0c350401a Merge remote-tracking branch 'upstream/esql/lang' into es-pipe-ql 2023-07-10 10:44:21 +02:00
Abdon Pijpelink a9dac30e1e One more set of meta attributes 2023-07-10 10:23:38 +02:00
Martijn van Groningen b259248568 Reused example from spec file 2023-07-10 10:17:12 +02:00
Costin Leau 1f77e2ba56 Merge commit '6d45c57b8fc6d504fdc28f355c6db22ac811e629' into esql/lang 2023-07-08 15:53:01 +03:00
Ryan Ernst 6d45c57b8f
Clarify keystore add-file command behavior (#97474)
This commit adds a little more explanation to what add-file does on the
keystore.

relates #97459
2023-07-07 15:44:16 -07:00
Mayya Sharipova 6164fa53d2
Add vector search file extensions to preload info (#97375)
Add vector search file extensions to preload info

Related to #96955
2023-07-07 15:45:08 -04:00
Martijn van Groningen c406b64058 use ROW in docs and added test with ROWS 2023-07-07 20:57:39 +02:00
Martijn van Groningen 3c3963cc28 Add trim function
This change adds a string `trim` function.
2023-07-07 17:37:38 +02:00
James Rodewig fe6a42b35f
[DOCS] Update Elastic GeoIP service link (#97455)
Adds TOS-related query parameters to the Elastic GeoIP link in the [GeoIP ingest processor docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html). The current link returns a 400 HTTP status.
2023-07-07 10:53:02 -04:00
Abdon Pijpelink 68b74bea34 Move IS_NULL, POW, ROUND, STARTS_WITH, SUBSTRING code snippets to CSV files 2023-07-07 15:45:06 +02:00
James Rodewig 52a915bf31
[DOCS] Fix TOC sidebar order 2023-07-07 08:48:03 -04:00
Abdon Pijpelink 02d62d29f4 Remove meta tags 2023-07-07 13:54:39 +02:00
James Rodewig 0781e60b19
[DOCS] Add TOC to landing page (#97437)
- Adds the TOC to the Elasticsearch docs landing page. Removes the right sidebar from the landing page.
- Removes the "View all Elastic docs" link from the bottom of the landing page

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-07-07 07:44:12 -04:00
Abdon Pijpelink f4581bb4bd Change ESQL into ES|QL 2023-07-07 13:42:06 +02:00
Simon Cooper 572716f7cc
Add IndexVersion to MainResponse (#97386) 2023-07-07 11:27:54 +01:00
Mark Tozzi 985b1949cb Log base 10 for ESQL (ESQL-1358)
Introduces a unary scalar function for base 10 log, which is a thin
wrapper over the Java.Math implementation

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-07-06 15:37:35 -04:00
Nik Everett f3b20067a3 Add `PI` and `TAU` functions (ESQL-1357)
Adds functions for the constants `PI` and it's big brother `TAU`.
2023-07-05 16:06:06 -05:00