Commit Graph

9008 Commits

Author SHA1 Message Date
Ignacio Vera 4fff3788f3
Disallow creating geo_shape mappings with deprecated parameters (#70850)
With the introduction of BKD-based geo shape indexing in #32039, the prefix tree indexing method has 
been deprecated. From 8.0.0, it will not be allowed to create new mappings using deprecated parameters.
2021-04-30 11:08:58 +02:00
Ignacio Vera 793166fd1f
[GeoPoint] Grid aggregations with bounds should exclude touching tiles (#72493) 2021-04-30 08:43:18 +02:00
Lisa Cawley 0074ba6d5a
[DOCS] Clarify update transform API (#72427) 2021-04-29 07:57:58 -07:00
Dan Hermann 30cd47e7f8
[DOCS] Clarify CCR auto-follow requirements for data streams (#72476) 2021-04-29 09:41:58 -05:00
Yang Wang 4bd5647fd2
Expose API Key metadata to SetSecurityUser ingest processor (#72137)
This PR ensures SetSecurityUserProcessor adds the API key metadata
inside the existing api_key object if the metadata is not null or empty.
2021-04-29 14:47:36 +10:00
debadair bef9b8a9b3
[DOCS] Edit JVM settings info. Closes #72259 (#72350)
* [DOCS] Edit JVM settings info. Closes #72259

* Apply suggestions from code review

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* Incorporated review feedback.
2021-04-28 18:30:32 -07:00
James Rodewig 44f3551786
[DOCS] EQL: Use ECS example in EQL syntax docs (#72414) 2021-04-28 14:02:12 -04:00
James Rodewig f1075e755c [DOCS] Fix several breaking changes 2021-04-28 13:38:17 -04:00
James Rodewig c5a38b4bf5 [DOCS] Fix breaking change formatting 2021-04-28 12:49:13 -04:00
James Rodewig 889197f8d0 [DOCS] Fix formatting 2021-04-28 11:40:33 -04:00
James Rodewig 84eebbbdd0 [DOCS] Decrement 'Search your data' headings 2021-04-28 11:37:57 -04:00
James Rodewig 0f02783139 [DOCS] Remove unneeded words 2021-04-28 08:51:56 -04:00
James Rodewig f8666b930f
[DOCS] Add 'Fix common cluster issues' docs (#72097) 2021-04-28 08:28:51 -04:00
István Zoltán Szabó ce9dd74cf5
[DOCS] Expands DFA and TM API docs with required privileges info (#71335) 2021-04-28 08:33:42 +02:00
debadair 633e1322f1
[DOCS] How to migrate to node roles from node attrs. Closes #65855 (#71160)
* [DOCS] Document how to migrate to node roles from node attrs. Closes #65855

* [DOCS] Incorporated review comments

* Update docs/reference/data-management/migrate-index-allocation-filters.asciidoc

Co-authored-by: Andrei Dan <andrei.dan@elastic.co>
2021-04-27 14:39:54 -07:00
James Rodewig 13179c71b6
[DOCS] EQL: Shorten response snippets (#72330)
Shortens several lengthy response snippets to better highlight the
relevant parts.
2021-04-27 16:02:45 -04:00
James Rodewig 97054d6570
[DOCS] Replace 'log into' with 'log in to' (#72324) 2021-04-27 15:27:22 -04:00
William Brafford fc7c06d8a1
Make feature reset API response more informative (#71240)
Previously, the ResetFeatureStateStatus object captured its status in a
String, which meant that if we wanted to know if something succeeded or
failed, we'd have to parse information out of the string. This isn't a
good way of doing things.

I've introduced a SUCCESS/FAILURE enum for status constants, and added a
check for failures in the transport action. We return a 207 if some but not all
reset actions fail, and for every failure, we also return information about the
exception or error that caused it.

Co-authored-by: Jay Modi <jaymode@users.noreply.github.com>
2021-04-27 13:47:10 -04:00
David Turner 1c4791e398
Abort writes in repo analyzer (#72077)
We rely on the repository implementation correctly handling the case where a
write is aborted before it completes. This is not guaranteed for third-party
repositories.

This commit adds a rare action during analysis which aborts the write
just before it completes and verifies that the target blob is not found
by any node.
2021-04-27 14:13:22 +01:00
Hendrik Muhs 7fff5df7a3
[Transform] add support for top metrics (#71850)
add support for the stats and top metrics aggregation in transform. With this change it became
easier to add more multi value aggregations to transform

Limitations:
 - only the 1st element of top_metrics gets consumed by transform[*].
 - all values of stats will be mapped to double if mapping deduction is used, including count,
   sum, min, max

fixes #52236
relates #51925
2021-04-27 13:45:53 +02:00
David Turner 12b60f64ba Trivial typo: bindiing -> binding 2021-04-27 12:20:46 +01:00
Henning Andersen 6fbd2601df
[DOCS] Disable shard allocation - data nodes only (#72265)
When doing a rolling restart we recommend disabling shard allocation to
avoid unnecessary recoveries. However, this advise is unnecessary or
even harmful when restarting nodes that do not carry any data like a
pure ML node.
2021-04-27 11:19:03 +02:00
Ryan Ernst 99c15cd05a
Remove documentation for multiple data paths (#72267)
relates #71205
2021-04-26 15:03:49 -07:00
James Rodewig 1ff080538a [DOCS] Update quick start heading 2021-04-26 17:48:01 -04:00
Adam Locke 881356ce18
[DOCS] Update id for service account redirect (#72268)
* [DOCS] Update id for service account redirect

* Remove duplicate redirect
2021-04-26 14:58:42 -04:00
Adam Locke 2ab277cc17
[DOCS] Adds temporary redirects for service account docs (#72262) 2021-04-26 14:06:00 -04:00
David Turner dd7f555ca5
Open with better cluster allocation explain ex. (#72245)
Today the only example of calling the cluster allocation explain API above the
fold is the bare `GET /_cluster/allocation/explain` which kind of works but is
not usually what the user wants. This commit changes the docs so that we open
with an example showing how we usually expect it to be called. This will make
it clearer that you should normally specify exactly for which shard you want an
explanation. It also tidies up a few other wrinkles in these docs.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-04-26 17:41:22 +01:00
Pierre Grimaud 3c44dfec60
[DOCS] Fix typos (#72227) 2021-04-26 12:40:38 -04:00
James Rodewig fd72a2690a [DOCS] Remove unneeded escapes 2021-04-26 12:14:45 -04:00
James Rodewig 32b5e610bf
[DOCS] Fix cat test snippets (#72233)
* Updates a cat test snippet to always return by index name in asc order
* Removes several leading slashes
* Reduces length of several snippet delimiters

Closes https://github.com/elastic/elasticsearch/issues/71683
2021-04-26 09:22:46 -04:00
István Zoltán Szabó 2f122f03b2
[DOCS] Adds anomaly detection rule advanced settings to docs (#72072)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-04-26 09:55:02 +02:00
James Rodewig 53fb357da5 [DOCS] Clarify `<script-id>` parameter def 2021-04-23 15:05:35 -04:00
James Rodewig 93784444f7 [DOCS] Fix created stored script API request paths 2021-04-23 11:38:06 -04:00
James Rodewig 230b0c35bd [DOCS] Fix data type of `include_defaults` parameter 2021-04-23 10:07:26 -04:00
James Rodewig d94af832c5 [DOCS] Remove uneeded 'How to' from title 2021-04-23 10:07:13 -04:00
Wylie Conlon 15806b648b
[DOCS] Clarify `timeout` and `terminate_after` parameters (#71713)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-04-23 09:26:21 -04:00
James Rodewig 56068a777e
[DOCS] Update Docker instructions for quick start (#72117) 2021-04-23 09:22:47 -04:00
James Rodewig f8d2578ede
[DOCS] EQL: Remove wildcard function (#72121) 2021-04-22 15:49:07 -04:00
Yang Cheng fc2d6f89c9
[DOCS] Remove internal versioning for concurrency control (#71570) 2021-04-22 10:54:58 -04:00
Adrien Grand 83113ec8d3
Add `match_only_text`, a space-efficient variant of `text`. (#66172)
This adds a new `match_only_text` field, which indexes the same data as a `text`
field that has `index_options: docs` and `norms: false` and uses the `_source`
for positional queries like `match_phrase`. Unlike `text`, this field doesn't
support scoring.
2021-04-22 08:41:47 +02:00
William Brafford d1bcd2a88b
Add docs for feature reset API (#71759)
* Add docs for feature reset API
* Prose and style much improved by Deb Adair.

Co-authored-by: debadair <debadair@elastic.co>
2021-04-21 17:40:10 -04:00
James Rodewig 3f2eb32afc
[DOCS] Sync EQL docs with `fields` param updates (#72008) 2021-04-21 09:13:27 -04:00
Jay Modi a7dbb31765
Add Fleet action results system data stream (#71667)
This commit adds support for system data streams and also the first use
of a system data stream with the fleet action results data stream. A
system data stream is one that is used to store system data that users
should not interact with directly. Elasticsearch will manage these data
streams. REST API access is available for external system data streams
so that other stack components can store system data within a system
data stream. System data streams will not use the system index read and
write threadpools.
2021-04-20 13:33:12 -06:00
Adam Locke 6dfd92c46f
[DOCS] Focus retrieving selected fields on fields parameter (#71506)
* [DOCS] Focus retrieving selected fields on fields parameter

* Incorporating changes from reviews

* Adding clarifications from review feedback

* Slight wording revisions.

* Clarify language around format parameter and move text out of callout.
2021-04-20 15:11:35 -04:00
Tim Brooks bfb85bcecb
Wait on index when polling global checkpoints (#71890)
Currently when the fleet global checkpoints API returns immediately if
the index is not ready or shards are not ready. This commit modifies the
API to wait on the index and primary shards active up until the timeout
period.

Related to #71449.
2021-04-20 13:04:42 -06:00
Tanguy Leroux f50b35719e
Revive documentation for experimental Searchable Snapshots APIs (#71927)
This commit revives the documentation of the "Clear Cache" and 
"Shard Stats" APIs of Searchable Snapshots that was removed 
in #62217. This is a partial revert of the commit b545c55 with 
some light wording changes.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-04-20 18:34:48 +02:00
James Rodewig 7a8db42e23
[DOC] Fix typos (#71869) (#71948)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Mimi Tsuruga <mimi.tsuruga@elastic.co>
2021-04-20 11:47:29 -04:00
Henning Andersen c57fbe8eaf
Frozen default cache size (#71844)
This commit adds a default cache size to frozen tier of the greater of
90% and total disk size minus 100 GB.
2021-04-20 17:37:39 +02:00
Henning Andersen 794869cfbb
Add separate flood stage limit for frozen (#71855)
Dedicated frozen nodes can survive less headroom than other data nodes.
This commits introduces a separate flood stage threshold for frozen as
well as an accompanying max_headroom setting that caps the amount of
free space necessary on frozen.

Relates #71844
2021-04-20 15:51:52 +02:00
Yannick Welsch 8c1938a524
Remove experimental status from frozen tier docs (#71923)
Removes the experimental status for the frozen tier / shared_cache searchable snapshots for the 7.13 release. 
Also adapts docs that URL repositories are now supported in 7.13 for searchable snapshots.
2021-04-20 15:37:56 +02:00
James Rodewig b2130249b0
[DOCS] Refactor quick start guide and README (#71331)
Changes:

* Refactors the "Getting Started" content down to one page.
* Refactors the README to reduce duplicated content and better mirror
Kibana's.
* Focuses the quick start on time series data, including data streams
and runtime fields.
* Streamlines self-managed install instructions to Docker.

Co-authored-by: debadair <debadair@elastic.co>
2021-04-20 09:32:21 -04:00
Francisco Fernández Castaño 9d8fb9fba2
Use the remaining scroll response documents on update by query bulk requests (#71430)
In update by query requests where max_docs < size and conflicts=proceed
we weren't using the remaining documents from the scroll response in
cases where there were conflicts and in the first bulk request the
successful updates < max_docs. This commit address that problem and
use the remaining documents from the scroll response instead of
requesting a new page.

Closes #63671
2021-04-20 14:45:17 +02:00
Henning Andersen 9d6ce2c8d6
Frozen autoscaling decider based on storage pct (#71756)
The frozen tier partially downloads shards only. This commit
introduces an autoscaling decider that scales the total storage
on the tier according to a configurable percentage relative to
the total data set size.
2021-04-20 14:09:07 +02:00
Mayya Sharipova f8215e752c
Add doc on rank_feature(s) negative score impact (#71795)
Add a warning about consequences of negative score impact
for documents that don't have values for rank_feature(s)
fields.

Related to #69994
2021-04-20 06:56:05 -04:00
Alan Woodward ee3510b766
Add index-time scripts to geo_point field mapper (#71861)
This commit adds the ability to define an index-time geo_point field
with a script parameter, allowing you to calculate points from other
values within the indexed document.
2021-04-20 10:24:25 +01:00
Luca Cavanna d8057bfe71
Rename on_script_error options to fail or continue (#71841)
As we started thinking about applying on_script_error to runtime fields, to handle script errors at search time, we would like to use the same parameter that was recently introduced for indexed fields. We decided that continue or fail gives a better indication of the behaviour compared to the current ignore or reject which is too specific to indexing documents.

This commit applies such rename.
2021-04-20 09:59:42 +02:00
James Rodewig 048ad99116 [DOCS] Consistent leading slash in snippets 2021-04-19 16:29:08 -04:00
Dan Hermann 868ef7ef4a
[DOCS] Registered domain processor (#71753) 2021-04-19 14:06:37 -05:00
Dan Hermann ac4e6d4ec8
[DOCS] Option to disable device type extraction in user agent processor (#71626) 2021-04-19 10:55:48 -05:00
Nhat Nguyen 46ada227dc
Expose dynamic_templates parameter in Ingest (#71716)
This change exposes the newly introduced parameter `dynamic_templates`
in ingest. This parameter can be set by a set processor or a script processor.

Relates #69948
2021-04-19 11:34:13 -04:00
Tanguy Leroux ceaa16eddc
Add node level cache stats for searchable snapshots (#71701)
This commit adds node-level statistics about the searchable 
snapshots shared cache that can be retrieved using the REST 
endpoint `GET /_searchable_snapshots/cache/stats`.

And the returned informations are:
{
  "nodes" : {
    "eerrtBMtQEisohZzxBLUSw" : {
      "shared_cache" : {
        "reads" : 6051,
        "bytes_read" : "5.1mb",
        "bytes_read_in_bytes" : 5448829,
        "writes" : 37,
        "bytes_written" : "1.1mb",
        "bytes_written_in_bytes" : 1208320,
        "evictions" : 5,
        "num_regions" : 32,
        "size" : "1mb",
        "size_in_bytes" : 1048576,
        "region_size" : "32kb",
        "region_size_in_bytes" : 32768
      }
    }
  }
}
2021-04-19 17:02:27 +02:00
James Rodewig 6dbad503d9 [DOCS] Correct `source` param data type 2021-04-19 10:42:22 -04:00
James Rodewig 512de84d76 [DOCS] Fix case of network direction processor title 2021-04-19 10:18:01 -04:00
Frederic Dartayre b50525af3f
Update ilm-skip-rollover.asciidoc 2021-04-19 15:57:49 +02:00
David Turner c8fb9aad40
Track index details in SnapshotInfo (#71754)
This commit adds some per-index statistics to the `SnapshotInfo` blob:

- number of shards
- total size in bytes
- maximum number of segments per shard

It also exposes these statistics in the get snapshot API.
2021-04-19 14:57:32 +01:00
James Rodewig c5a2f9ed9c [DOCS] Remove beta admon for runtime fields 2021-04-19 09:35:44 -04:00
James Rodewig f9c5f55c4b
[DOCS] Document create stored script API (#71493) 2021-04-19 09:19:12 -04:00
James Rodewig 07fade1d27
[DOCS] EQL/SQL: Document `runtime_fields` parameter (#71487) 2021-04-19 09:15:12 -04:00
Mayya Sharipova 853e68dfdf
Add access to dense_vector values (#71313)
Allow direct access to a dense_vector' values in script
through the following functions:

- getVectorValue – returns a vector's value as an array of floats
- getMagnitude – returns a vector's magnitude

Closes #51964
2021-04-19 08:02:05 -04:00
István Zoltán Szabó aca0a7ffa4
[DOCS] Alters examples in anomaly detection page to use runtime mappings (#71745) 2021-04-19 13:06:50 +02:00
István Zoltán Szabó 51fe73081d
[DOCS] Adds further details and an example to how transform checkpointing works (#71615) 2021-04-19 11:29:17 +02:00
István Zoltán Szabó 11c22ce23a
[DOCS] Adds backticks to xpack.ml.use_auto_machine_memory_percent. (#71814) 2021-04-19 11:12:27 +02:00
Dan Hermann 60345ac181
Option to disable device type parsing in user agent processor (#71625) 2021-04-16 07:08:30 -05:00
Henning Andersen eee399aeb5
Introduce separate shard limit for frozen shards (#71392)
Frozen indices (partial searchable snapshots) require less heap per
shard and the limit can therefore be raised for those. We pick 3000
frozen shards per frozen data node, since we think 2000 is reasonable
to use in production.

Relates #71042 and #34021
2021-04-15 19:33:29 +02:00
Benjamin Trent 01fc8ed246
[ML] adding ability to update runtime_mappings via datafeed config update API (#71707)
Adds runtime_mappings as an updatable field via datafeed config update.

closes: #71702
2021-04-15 09:44:34 -04:00
Henning Andersen a0d1c5bebf
Autoscaling frozen shards docs (#71583)
Added documentation for the frozen shards decider.

Relates #71042
2021-04-15 15:35:12 +02:00
Przemko Robakowski 308aee283d
Update GeoIP processor documentation (#71211)
This PR adds documentation for GeoIPv2 auto-update feature.
It also changes related settings names from geoip.downloader.* to ingest.geoip.downloader to have the same convention as current setting.

Relates to #68920

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-04-15 13:47:09 +02:00
Christoph Büscher 948d02e4d6
Support fetching flattened subfields (#70916)
Currently the `fields` API fetches the root flattened field and returns it in a
structured way in the response. In addition this change makes it possible to
directly query subfields. However, requesting flattened subfields via wildcard
patterns is not possible.

Closes #70605
2021-04-15 12:28:58 +02:00
István Zoltán Szabó ce389dff5d
[DOCS] Clarifies that custom rules are job rules in Kibana (#71678)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-04-15 09:33:03 +02:00
Julie Tibshirani 318bf14126
Introduce `combined_fields` query (#71213)
This PR introduces a new query called `combined_fields` for searching multiple
text fields. It takes a term-centric view, first analyzing the query string
into individual terms, then searching for each term any of the fields as though
they were one combined field. It is based on Lucene's `CombinedFieldQuery`,
which takes a principled approach to scoring based on the BM25F formula.

This query provides an alternative to the `cross_fields` `multi_match` mode. It
has simpler behavior and a more robust approach to scoring.

Addresses #41106.
2021-04-14 13:33:19 -07:00
Tim Brooks d5b96a35d0
Add fleet polling API for global checkpoint (#71093)
Fleet server needs an API to access up to date global checkpoints for
indices. Additionally, it requires a mode of operation when fleet can
provide its current knowledge about the global checkpoints and poll for
advancements. This commit introduces this API in the fleet plugin.
2021-04-14 11:19:33 -06:00
Andrew Stucki c102566a64
Network direction processor supports dynamic internal networks specification (#68712) 2021-04-14 08:13:42 -05:00
Alan Woodward 05551dd77b
Add index-time scripts to date field mapper (#71633)
This commit allows you to set 'script' and 'on_script_error' parameters
on date field mappers, meaning that runtime date fields can be made indexed
simply by moving their definitions from the runtime section of the mappings
to the properties section.
2021-04-14 09:18:05 +01:00
Nik Everett 6607a48435
Advise against dates with decimal points (#71578)
We accept dates with a decimal point like `2113413.13241324` and parse
them *somehow*. But there are cases where we'll lose precision on those
dates, see #70085. This advises folks not to use that format. We'll
continue to accept those dates for backwards compatibility but you
should avoid using them.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
2021-04-13 15:11:05 -04:00
Lyudmila Fokina 3b0b7941ae
Warn users if security is implicitly disabled (#70114)
* Warn users if security is implicitly disabled

Elasticsearch has security features implicitly disabled by default for
Basic and Trial licenses, unless explicitly set in the configuration
file.
This may be good for onboarding, but it also lead to unintended insecure
 clusters.
 This change introduces clear warnings when security features are
 implicitly disabled.
 - a warning header in each REST response if security is implicitly
 disabled;
 - a log message during cluster boot.
2021-04-13 18:33:41 +02:00
Nik Everett b2caf4d230
Convert parent-join example script to runtime field (#71423)
Runtime fields are much more flexible than script_fields because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `parent_join` field in a script to a
runtime field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do something.

Relates to #69291
2021-04-13 09:00:18 -04:00
Alan Woodward 67db2538f8
Add index-time scripts to IP field mapper (#71617)
This commit allows you to set 'script' and 'on_script_error' parameters
on IP field mappers, meaning that runtime IP fields can be made indexed
simply by moving their definitions from the runtime section of the mappings
to the properties section.
2021-04-13 13:40:10 +01:00
Andrei Dan b2639d700a
DOCS: update `delete_searchable_snapshot` option documentation (#71547)
If enabled, the `delete_searchable_snapshot` option will attempt to delete the
index snapshot generated in any previous phase, for the purpose of mounting the
index as a searchable snapshot.
2021-04-13 11:25:15 +01:00
Nik Everett 0623b03170
Fit runtime field on line (#71470)
This shrinks a runtime field definition so that it fits on the screen
without scrolling. It also converts the doc into a test so we can be
sure it continues to work.

Relates to #69291
2021-04-12 18:15:44 -04:00
Nik Everett e4451bda05
Convert date_nanos example script to runtime field (#71351)
Runtime fields are much more flexible than script_fields because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `date_nanos` field in a script to a
runtime field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do something.

Relates to #69291

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-12 17:22:02 -04:00
Alan Woodward 5e11709693
Add scripts to keyword field mapper (#71555)
This commit adds script and on_script_error parameters to
keyword field mappers, allowing you to define index-time scripts
for keyword fields.
2021-04-12 16:46:02 +01:00
Luca Cavanna 6422fd5df2
Output script stats for indexed fields (#71219)
We have recently introduced the ability to associate an indexed field with a script. This commit updates the existing mappings stats to output stats about the script, similar to what we already do for runtime fields.
2021-04-12 13:32:50 +02:00
Luca Cavanna 1469e18c98
Add support for script parameter to boolean field mapper (#71454)
Relates to #68984
2021-04-12 10:04:12 +02:00
James Rodewig 7cd6952986
[DOCS] Move JSON encoding section (#71508) 2021-04-10 09:07:24 -04:00
James Rodewig 0f3d53b517 [DOCS] Fix create enrich policy API title 2021-04-08 17:53:27 -04:00
James Rodewig a613f039fb
[DOCS] Document REST API uses UTF-8 encoding (#71474) 2021-04-08 15:44:09 -04:00
James Rodewig 3d172da8dd
[DOCS] Fix create enrich policy API title (#71494) 2021-04-08 15:35:53 -04:00
Julie Tibshirani 3da738e5db
Support fetching _tier field value (#71379)
Now that the `fields` option allows fetching metadata fields, we can support
loading the new `_tier` metadata field.

Relates to #63569 and #68135.
2021-04-08 11:41:52 -07:00
Adam Locke 5baabff667
[DOCS] Update mapping API to require index name (#71489) 2021-04-08 13:54:37 -04:00
James Rodewig 44922f6b3d [DOCS] Fix search template label 2021-04-08 13:14:10 -04:00
Nhat Nguyen 5c9969250d
Allow specify dynamic templates in bulk request (#69948)
This change allows users to specify dynamic templates in a bulk request.

```
PUT myindex
{
  "mappings": {
    "dynamic_templates": [{
      "time_histograms": {
        "mapping": {
          "type": "histogram",
          "meta": {
            "unit": "s"
          }
        }
      }
    }]
  }
}
```

```
POST myindex/_bulk
{ "index": { "dynamic_templates": { "response_times": "time_histograms" } } }
{ "@timestamp": "2020-08-12", "response_times": { "values": [1, 10], "counts": [5, 1] }}
```

Closes #61939
2021-04-08 12:44:36 -04:00
James Rodewig de228ee153
[DOCS] Reorder EQL sections. Remove duplicated content. (#71477) 2021-04-08 10:45:33 -04:00
James Rodewig 3ca5a93446 [DOCS] Fix GeoIP capitalization 2021-04-07 14:26:32 -04:00
Adam Locke 343c52c19f
[DOCS] Adding page for indexing runtime fields (#71366)
* [DOCS] Adding page for indexing runtime fields

* Fixing tests.

* Incorporating review feedback to enhance and improve examples.

* Changing note to indicate immutable script when indexing, plus adding on_script_error.
2021-04-07 13:07:39 -04:00
James Rodewig 14e6b073a1
[DOCS] Add redirect for missing geoIP stats API docs (#71402) 2021-04-07 09:15:44 -04:00
Gonzalo Servat 3a5eba485b
Fix typo in "handing" (missing "l") (#71383) 2021-04-07 08:07:50 -04:00
David Turner 6ed2d25458
Include node roles in cluster state JSON response (#71386)
Today the response to `GET _cluster/state` does not include the roles of
the nodes in the cluster. In the past this made sense, roles were
relatively unchanging things that could be determined from elsewhere.
These days we have an increasingly rich collection of roles, with
nontrivial BWC implications, so it is important for debugging to be able
to see the specific roles as viewed by the master. This commit adds the
role names to the cluster state API output.

Relates #71385
2021-04-07 10:44:35 +01:00
James Rodewig b127447548 [DOCS] Fix cat API name 2021-04-06 17:17:05 -04:00
James Rodewig 1f361ad2d1
[DOCS] Update size your shards for `max_primary_shard_size` (#71367) 2021-04-06 17:08:24 -04:00
James Rodewig 40b491b2f1
[DOCS] Use HTML-unescaped Mustache variables in ingest pipelines (#71360) 2021-04-06 15:33:10 -04:00
Nik Everett e158bc10b1
Convert `boolean` field example to runtime fields (#71341)
Runtime fields are much more flexible than `script_fields` because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `boolean` field in a script to a runtime
field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do *something*.

Relates to #69291
2021-04-06 14:42:44 -04:00
James Rodewig 9fff70c3b2 [DOCS] Fix xref 2021-04-06 12:10:39 -04:00
James Rodewig 65be40ac7b
[DOCS] Refactor rollover API docs (#70938) 2021-04-06 11:51:02 -04:00
Adam Locke af700f4628
[DOCS] Update runtime fields for script query (#71338)
Fixes typo, moves example out of a NOTE admonition, and puts context before the example.
2021-04-06 10:12:08 -04:00
Alan Woodward 98c9a95e12
Add note that scripted fields will reject documents with a source value in their field (#71340) 2021-04-06 14:28:20 +01:00
James Rodewig 07e9c6aca4 [DOCS] Swap `event.original` for `message` 2021-04-06 06:51:58 -04:00
Tanguy Leroux e26e14441e
Document CCR auto-follow patterns and searchable snapshots indices (#70863)
This commit adds a note in CCR document about auto-follow 
patterns that should not match searchable snapshots indices.

Relates #70580 (comment)
2021-04-06 10:47:00 +02:00
Ryan Ernst f6b833cf27
Add multiple data paths deprecation to docs (#71312)
This commit adds a deprecation note to the multiple data paths doc. It also removes mention of multiple paths support in the setup settings table.

relates #71205
2021-04-05 16:28:19 -07:00
James Rodewig 94d88082ec [DOCS] Swap `message` for `event.original` 2021-04-05 13:57:59 -04:00
Nik Everett 5677c6822e
Point script query docs at runtime fields (#71291)
This adds a "note" on the docs for the script query pointing folks to
runtime fields because they are more flexible. It also translates the
request example into runtime fields.

Relates to #69291

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-05 13:11:29 -04:00
Nik Everett 6a1220e7f3
Convert metric aggs docs runtime fields (#71260)
This replaces the `script` docs for bucket aggregations with runtime
fields. We expect runtime fields to be nicer to work with because you
can also fetch them or filter on them. We expect them to be faster
because their don't need this sort of `instanceof` tree:
a92a647b9f/server/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java (L42)

Relates to #69291

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-05 13:08:13 -04:00
James Rodewig c23f001151
[DOCS] Add how-to guide for time series data (#71195) 2021-04-05 13:00:06 -04:00
James Rodewig d3c56e6fca [DOCS] Remove unneeded articles for Elasticsearch Service and Elastic Agent 2021-04-02 16:01:59 -04:00
Adam Locke 14aba7bcff
[DOCS] Expand examples for runtime fields in a search query (#71237)
* Add warning admonition for removing runtime fields.

* Add cross-link to runtime fields.

* Expanding examples for runtime fields in a search request.

* Clarifying language and simplifying response tests.
2021-04-02 15:00:54 -04:00
Jason Tedor d340432622
Remove frozen cache setting leniency (#71013)
We previously allowed but deprecated the ability for the shared cache to
be positively sized on nodes without the frozen role. This is because we
only allocate shared_cache searchable snapshots to nodes with the frozen
role. This commit completes our intention to deprecate/remove this
ability.
2021-04-02 14:26:01 -04:00
Nik Everett a9d9ee0d4b
Convert bucket aggs docs to runtime fields (#71202)
This replaces the `script` docs for bucket aggregations with runtime
fields. We expect runtime fields to be nicer to work with because you
can also fetch them or filter on them. We expect them to be faster
because their don't need this sort of `instanceof` tree:
a92a647b9f/server/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java (L42)

Relates to #69291

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-02 12:12:06 -04:00
James Rodewig 55f3db74a6
[DOCS] Fix 'Register a snapshot repo' title (#71224) 2021-04-02 09:26:20 -04:00
James Rodewig 0b9f71f3f5
[DOCS] Rename Glossary (#71222)
Changes title from "Glossary of terms" to "Glossary."
"Glossary of terms" is redundant.
2021-04-02 09:12:05 -04:00
James Rodewig 4963118fcc
[DOCS] Update button copy (#71220) 2021-04-02 09:06:50 -04:00
Dan Hermann 579d0367b1
[DOCS] http.client_stats.enabled setting (#71188) 2021-04-02 07:58:05 -05:00
Jason Tedor a5a5278954
Remove legacy role settings (#71163)
This commit removes the previously deprecated legacy role
settings. These settings have been replaced by node.roles.
2021-04-01 19:31:55 -04:00
James Rodewig 3c02ab4190
[DOCS] Add ECS and runtime fields tip to data stream tutorial (#71183) 2021-04-01 15:54:53 -04:00
James Rodewig 2dd034bc65
[DOCS] Rename ES Reference to ES Guide (#71198) 2021-04-01 15:38:41 -04:00
James Rodewig 115d2b2680 [DOCS] Reword data stream indexing section 2021-04-01 10:23:48 -04:00
James Rodewig a4fa22c099 [DOCS] Reword link to Fleet data stream docs 2021-04-01 10:15:56 -04:00
James Rodewig 671dc331cd [DOCS] Remove unused widget files 2021-04-01 08:35:46 -04:00
James Rodewig f41320616c
[DOCS] Refactor data stream setup tutorial (#71074) 2021-03-31 17:28:55 -04:00
Adam Locke f06dc219b2
[DOCS] Fixes deprecation message for Geo-polygon query (#71141)
* [DOCS] Fixes deprecation message for Geo-polygon query

* Change deprecation to full block admonition.
2021-03-31 16:37:29 -04:00
William Brafford 6b349af7d9
Add breaking change notice for action.destructive_requires_name (#71007)
* Add breaking change notice for action.destructive_requires_name
2021-03-31 16:00:29 -04:00
Yash Jipkate 60f4d22722
Change default value of `action.destructive_requires_name` to True. (#66908)
This PR sets the default value of `action.destructive_requires_name`
to `true.` Fixes #61074. Additionally, we set this value explicitly in
test classes that rely on wildcard deletions to clear test state.
2021-03-31 15:59:57 -04:00
Julie Tibshirani d02df3f3fe
Remove the beta flag from 'fields' option. (#71130)
Now that we've addressed the open issues, the 'fields' option can be considered GA.

Relates to #60985.
2021-03-31 10:00:42 -07:00
James Rodewig 9ab1a6caa3
[DOCS] Fix put lifecycle policy API title (#71124) 2021-03-31 11:37:45 -04:00
markharwood 3aee4c1f1f
New queryable "_tier" metadata field (#69288)
New _tier metadata field that supports term, terms, exists and wildcard queries on the first data tier preference stated for an index.

Closes #68135
2021-03-31 15:37:37 +01:00
James Rodewig 693807a6d3
[DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
James Rodewig 27abdd9f2a
[DOCS] Document ingest pipelines for Fleet and Elastic Agent (#70907) 2021-03-31 09:01:18 -04:00
James Rodewig 955df4337b
[DOCS] Fix typos for Elasticsearch Service and Elastic Agent (#71076) 2021-03-31 08:36:21 -04:00
James Rodewig db6da195d0 [DOCS] Fix typo 2021-03-31 08:14:47 -04:00
Alan Woodward 1653f2fe91
Add script parameter to long and double field mappers (#69531)
This commit adds a script parameter to long and double fields that makes
it possible to calculate a value for these fields at index time. It uses the same
script context as the equivalent runtime fields, and allows for multiple index-time
scripted fields to cross-refer while still checking for indirection loops.
2021-03-31 11:14:11 +01:00
Henning Andersen 0f28e97857
Total data set size in stats (#70625)
With shared cache searchable snapshots we have shards that have a size
in S3 that differs from the locally occupied disk space. This commit
introduces `store.total_data_set_size` to node and indices stats, allowing to
differ between the two.

Relates #69820
2021-03-30 15:23:29 +02:00
Benjamin Trent c8415a7924
[ML] adding support for composite aggs in anomaly detection (#69970)
This commit allows for composite aggregations in datafeeds. 

Composite aggs provide a much better solution for having influencers, partitions, etc. on high volume data. Instead of worrying about long scrolls in the datafeed, the calculation is distributed across cluster via the aggregations. 

The restrictions for this support are as follows:

- The composite aggregation must have EXACTLY one `date_histogram` source
- The sub-aggs of the composite aggregation must have a `max` aggregation on the SAME timefield as the aforementioned `date_histogram` source
- The composite agg must be the ONLY top level agg and it cannot have a `composite` or `date_histogram` sub-agg
- If using a `date_histogram` to bucket time, it cannot have a `composite` sub-agg.
- The top-level `composite` agg cannot have a sibling pipeline agg. Pipeline aggregations are supported as a sub-agg (thus a pipeline agg INSIDE the bucket).

Some key user interaction differences:
- Speed + resources used by the cluster should be controlled by the `size` parameter in the `composite` aggregation. Previously, we said if you are using aggs, use a specific `chunking_config`. But, with composite, that is not necessary. 
- Users really shouldn't use nested `terms` aggs anylonger. While this is still a "valid" configuration and MAY be desirable for some users (only wanting the top 10 of certain terms), typically when users want influencers, partition fields, etc. they want the ENTIRE population. Previously, this really wasn't possible with aggs, with `composite` it is.
- I cannot really think of a typical usecase that SHOULD ever use a multi-bucket aggregation that is NOT supported by composite.
2021-03-30 08:25:40 -04:00
James Rodewig 15f863813c [DOCS] Fix wording 2021-03-30 06:50:53 -04:00
James Rodewig 69db7ce171
[DOCS] Remove dupe `wait_for_completion` def (#71012) 2021-03-30 06:46:57 -04:00
James Rodewig ea347302e2
[DOCS] Add reusable tests to ingest docs (#70990) 2021-03-30 06:38:34 -04:00
Jim Ferenczi fa88a46b9c
Expose if a field is a metadata field in the field capabilities response (#69977)
This change exposes for each field in the _field_caps response if the field is a metadata field.
This is needed for consumers of this API that want to filter these fields. Currently ML keeps a static list
and QL checks that the family type starts with `_`. In order to ease the addition of new metadata fields, this
change reworks the strategy in this solution and now only checks for the new flag.
Note that the new flag is also applied at the coordinator level in a best-effort to apply the logic on older nodes
in a mixed-version cluster.
2021-03-30 12:13:03 +02:00
Martijn van Groningen 9089e45173
Update docs that closing a data stream's write index is allowed (#71039)
This was forgotten as part of #70908
2021-03-30 11:49:09 +02:00
markharwood 2f9c7318c2
Search - make wildcard field use constant scoring queries for wildcard queries and caching fix (#70452)
* Make wildcard field use constant scoring queries for wildcard queries. Add a note about ignoring rewrite parameters on wildcard queries.

Also fixes caching issue where case sensitive and case insensitive results were cached as the same

Closes #69604
2021-03-30 10:37:39 +01:00
István Zoltán Szabó 1db2b85e45
[DOCS] Adds source index privileges required for Explain DFA API docs. (#70978) 2021-03-30 10:42:48 +02:00
Shahzad f7efa3eaba
Extract device type from user agent info (#69322) 2021-03-29 16:34:53 -05:00
James Rodewig b2cd89ec09
[DOCS] Split enrich examples from enrich tutorial (#71001) 2021-03-29 12:54:08 -04:00
James Rodewig 20df933e6b
[DOCS] Update data stream rollover references (#70993) 2021-03-29 10:37:14 -04:00
James Rodewig a73631eab8 [DOCS] Resize test pipeline image 2021-03-29 10:34:34 -04:00
James Rodewig fdbea16e15
[DOCS] Move EQL event category section (#70955)
Combines the basic syntax and event category sections for better visibility.
2021-03-29 09:40:34 -04:00
Ignacio Vera a35563aaaf
Fix infinite loop when polygonizing a circle with centre on the pole (#70875)
This PR prevents the algorithm to run on circles that contain a pole.
2021-03-29 07:36:29 +02:00
Benjamin Trent b796632582
[ML] Allow datafeed and job configs for datafeed preview API (#70836)
Previously, a datafeed and job must already exist for the `_preview` API to work.

With this change, users can get an accurate preview of the data that will be sent to the anomaly detection job
without creating either of them. 

closes https://github.com/elastic/elasticsearch/issues/70264
2021-03-26 12:52:23 -04:00
James Rodewig 77cd0b5b74 [DOCS] Sync timestamps 2021-03-26 12:30:44 -04:00
James Rodewig 805cc77aae [DOCS] Remove leading slash for consistency 2021-03-26 11:48:24 -04:00
James Rodewig 1514fa8619 [DOCS] Fix whitespace consistency 2021-03-26 11:45:43 -04:00
James Rodewig 06010b96aa [DOCS] Remove leading slash for consistency 2021-03-26 11:06:58 -04:00
James Rodewig fa93666b6a
[DOCS] Document ingest processor description (#70899) 2021-03-26 09:42:46 -04:00
James Rodewig 493741dd7f
[DOCS] Remove docs for rollup refactor (#70885) 2021-03-26 09:03:00 -04:00
István Zoltán Szabó 9a8c6fb66f
[DOCS] Removes beta labels from DFA related docs. (#70808) 2021-03-26 09:46:41 +01:00
James Rodewig 911293fb4a
[DOCS] Use ECS fields in ingest pipeline tutorial (#70884) 2021-03-25 17:30:45 -04:00
Adam Locke 184cb449cc
[DOCS] Clarify language for supported APIs with CCS and older clusters (#70734)
* [DOCS] Clarify supported features for CCS.

* Clarify text and add subsection with title.

* Moving APIs to supported API section and paring down text.
2021-03-25 13:08:34 -04:00
Adam Locke 8dd563134c
[DOCS] Overhaul TLS security docs (#68946)
* Removing security overview and condensing.

* Adding new security file.

* Minor changes.

* Removing link to pass build.

* Adding minimal security page.

* Adding minimal security page.

* Changes to intro.

* Add basic and basic + http configurations.

* Lots of changes, removed files, and redirects.

* Moving some AD and LDAP sections, plus more redirects.

* Redirects for SAML.

* Updating snippet languages and redirects.

* Adding another SAML redirect.

* Hopefully fixing the ci/2 error.

* Fixing another broken link for SAML.

* Adding what's next sections and some cleanup.

* Removes both security tutorials from the TOC.

* Adding redirect for removed tutorial.

* Add graphic for Elastic Security layers.

* Incorporating reviewer feedback.

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-minimal-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/index.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup-https.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Apply suggestions from code review

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>

* Additional changes from review feedback.

* Incorporating reviewer feedback.

* Incorporating more reviewer feedback.

* Clarify that TLS is for authenticating nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify security between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify that TLS is between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Update title for configuring Kibana with a password

Co-authored-by: Tim Vernum <tim@adjective.org>

* Move section for enabling passwords between Kibana and ES to minimal security.

* Add section for transport description, plus incorporate more reviewer feedback.

* Moving operator privileges lower in the navigation.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
Co-authored-by: Tim Vernum <tim@adjective.org>
2021-03-25 11:54:39 -04:00
James Rodewig 6504b541e9
[DOCS] EQL: Use data streams in docs (#70822) 2021-03-25 09:41:06 -04:00
James Rodewig 48f0ae6509 [DOCS] Add newline to end of file 2021-03-25 09:33:59 -04:00
James Rodewig bd4439be24
[DOCS] Replace hard-coded admons with cloud-only attribute (#70864) 2021-03-25 09:21:35 -04:00
James Rodewig 224bf7943a
[DOCS] Move enrich policy object def to API docs (#70825) 2021-03-25 09:17:41 -04:00
Nik Everett 75342a2a71
Add `teardown` support for doc tests (#70831)
This adds named `teardown` support for doc tests similar to its support
for named `setup` section. This is useful when many doc files want to
share a similar `setup` AND `teardown`. I've introduced an example of
this in the CCR docs just to prove its works. We expect we'll use it for
datastreams as well.

Closes #70830

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-24 16:57:50 -04:00
Nik Everett 2b9ed7d36f
Docs: Clean doc for agg parameter (#70675)
This adds a heading for `shard_min_doc_count` and merges the paragraphs
for them. I wanted to link to this section earlier today and it wasn't a
"real" section so I couldn't.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-24 16:22:26 -04:00
Nhat Nguyen 5bb440cdca
Move point in time to server (#70704)
This change moves the implementation of point in time to the server package.
2021-03-24 14:29:20 -04:00
James Rodewig 1b06f4cc62
[DOCS] Add info about allowed profile names (#70440) (#70815)
Co-authored-by: Robin Clarke <robin.clarke@elastic.co>
2021-03-24 10:10:21 -04:00
Dan Hermann f3b27541ff
[DOCS] Add MurmurHash3 as a supported hash method for fingerprint processor (#70737) 2021-03-24 07:25:22 -05:00
István Zoltán Szabó 178563c224
[DOCS] Reorganizes Transforms limitations (#70638) 2021-03-24 11:22:59 +01:00
Martijn van Groningen ccb473c56c
Adjust the docs for template-v1 API (#70801)
The delete legacy template API doesn't support comma-separated list of names in any version.

Forward-port of #70649
2021-03-24 11:15:15 +01:00
David Turner dd69ae95d7
Note recovery settings affect searchable snapshots (#70771)
Adds a short note that `max_restore_bytes_per_sec` and
`indices.recovery.max_bytes_per_sec` also affect the recovery of a
searchable snapshot index.
2021-03-24 09:22:44 +00:00
James Rodewig d58ab817a2
[DOCS] Fix sidebar for built-in index patterns (#70788) 2021-03-23 20:18:33 -04:00
James Rodewig 5805ae2eb7
[DOCS] Fix 'How To' title (#70772) 2021-03-23 14:02:48 -04:00
James Rodewig 7bddd7db5c
[DOCS] Fix collapsible properties role (#70756) 2021-03-23 11:14:46 -04:00
James Rodewig e76c229b33
[DOCS] Note you can omit `type` for custom analyzers (#70754) 2021-03-23 11:13:20 -04:00
James Rodewig cfe13a843e
[DOCS] Fix heading for ILM shrink example (#70733) 2021-03-23 11:07:02 -04:00
István Zoltán Szabó c4a33f2413
[DOCS] Adds latest transform example to transform docs (#70562)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-23 15:34:10 +01:00
James Rodewig deb4805779
[DOCS] Fix simulate pipeline API's request parameter docs (#70678) 2021-03-23 09:40:17 -04:00
James Rodewig d7144dedf8
[DOCS] Document `on_failure` param for create pipeline API (#70679) 2021-03-23 09:22:34 -04:00
Jake Landis c0f731f590
[master] docs: Add reference to reporting warning customization (#70515) (#70684)
Co-authored-by: Jake Landis <jake.landis@elastic.co>

Co-authored-by: Marcos Antonio de Almeida Ramos <almeidamarcos.a@gmail.com>
2021-03-23 08:05:36 -05:00
James Rodewig 321f46e187
[DOCS] EQL: Document Unicode escape sequences (#70694) 2021-03-23 08:10:03 -04:00
James Rodewig 026c02b1ee
[DOCS] Add additional example to ingest pipeline docs (#70677) 2021-03-23 07:54:41 -04:00
Ignacio Vera b81bb42ed9
Increase search.max_bucket by one (#70645) 2021-03-23 08:54:48 +01:00
James Rodewig cbfe969634 [DOCS] EQL: Remove unneded words in escape sequence table 2021-03-22 16:45:49 -04:00
James Rodewig 08c3bb6e8a [DOCS] Fix heading in create ingest pipeline API docs 2021-03-22 14:06:14 -04:00
James Rodewig b65992ede5 [DOCS] Streamline create pipeline API parameter defs 2021-03-22 13:00:48 -04:00
James Rodewig a242a7a42a
[DOCS] Replace external links with xrefs (#70667) 2021-03-22 12:44:05 -04:00
Dan Hermann e47aea3765
[DOCS] IP type for convert processor (#70599) 2021-03-22 11:36:50 -05:00
James Rodewig 78078112f1 Fix rollover xrefs 2021-03-22 11:51:36 -04:00
Yannick Welsch f9aa282b7e
Additional docs for shared_cache searchable snapshots (#70566)
This adds additional documentation for shared_cache searchable snapshots that are targeting the frozen tier:

- it generalizes the introduction section on searchable snapshots, mentioning that they come in two flavors now 
as well as the relation to cold and frozen tiers,
- it expands the shared_cache section and
- it adds Cloud-specific instructions for getting started with the frozen tier

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: David Turner <david.turner@elastic.co>
2021-03-22 16:42:58 +01:00
James Rodewig f9a00491d3
[DOCS] Refactor glossary (#70516) 2021-03-22 11:25:45 -04:00
James Rodewig 85516d6901 [DOCS] Fix typos 2021-03-22 10:43:44 -04:00
James Rodewig bfc4139ada
[DOCS] Disambiguate logs and data in path settings docs (#70629) 2021-03-22 10:13:32 -04:00
Bogdan Pintea 925f1645cf
SQL: Enforce and document dedicated client version compatibility (#70451)
* Implement dedicated client version compatibility

Add further dedicated client (xDBC, CLI) compatibility rules and
document these. A client is version-compatible with the server if:
- it supports version compatibility (past or on 7.7.0); and
- it's not on a version newer than server's; and
- it's major version is at most one unit behind server's.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-22 11:17:51 +01:00
Jonathan Halterman 852c837141
Clarify data replication docs to mention in-sync replicas (#70604)
Clarifies primary shard flow for handling write requests to indicate that all in-sync replicas must ack a write.
2021-03-19 13:17:16 -07:00
Dan Hermann 8ff7360901
[DOCS] HTTP client stats (#70512) 2021-03-19 06:22:17 -05:00
Henning Andersen 9002bd81a1
[DOCS] Frozen tier dedicated (#70542)
The frozen tier is now dedicated for searchable snapshots mounted with
the `shared_cache` option. This commit adjusts docs accordingly.
2021-03-19 11:16:41 +01:00
Adam Locke aba4422606
[DOCS] Focus scripting docs on Painless (#69748)
* Initial changes for scripting.

* Shorten script examples.

* Expanding types docs.

* Updating types.

* Fixing broken cross-link.

* Fixing map error.

* Incorporating review feedback.

* Fixing broken table.

* Adding more info about reference types.

* Fixing broken path.

* Adding more info an examples for def type.

* Adding more info on operators.

* Incorporating review feedback.

* Adding notconsole for example.

* Removing comments in example.

* More review feedback.

* Editorial changes.

* Incorporating more reviewer feedback.

* Rewrites based on review feedback.

* Adding new sections for storing scripts and shortening scripts.

* Adding redirect for stored scripts.

* Adding DELETE for stored script plus link.

* Adding section for updating docs with scripts.

* Incorporating final feedback from reviews.

* Tightening up a few areas.

* Minor change around other languages.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-18 15:58:33 -04:00
István Zoltán Szabó 165c0ddaeb
[DOCS] Updates anomaly detection alert docs with the new alerting terminology (#70486)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-18 18:23:19 +01:00
Andrei Dan 9831084067
ILM: Make all the shrink action steps retryable (#70107)
This aims at making the shrink action retryable. Every step is
retryable, but in order to provide an experience where ILM tries
to achieve a successful shrink even when the target node goes
missing permanently or the shrunk index cannot recover, this also
introduces a retryable shrink cycle within the shrink action.

The shrink action will generate a unique index name that'll be the
shrunk index name. The generated index name is stored in the lifecycle
state.

If the shrink action ends up waiting for the source shards to
colocate or for the shrunk index to recover for more than the configured
`LIFECYCLE_STEP_WAIT_TIME_THRESHOLD` setting, it will move back
to clean up the attempted (and failed) shrunk index and will retry
generating a new index name and attempting to shrink the source
to the newly generated index name.
2021-03-18 16:05:15 +00:00
James Rodewig 3bac730a50
[DOCS] Fix nori tokenizer link (#70564) 2021-03-18 11:04:46 -04:00
Tommmster a767350859
[DOCS] Document date math support for aliases (#70535)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-18 10:52:48 -04:00
David Turner 737d850ac6
Clarify persistence on master-eligible nodes (#70556)
We document that master nodes should have a persistent data path but
it's a bit hard to understand that this is what the docs are saying and
we don't really say why it's important. This commit clarifies this
paragraph.

Relates 49d0f3406c
2021-03-18 14:51:11 +00:00
David Turner ee0f116e9e
Recommend no requests to dedicated masters (#70491)
Today the docs on node roles say that you shouldn't use dedicated
masters for heavy requests such as indexing and searching, but as per
the "designing for resilience" docs this guidance applies to all client
requests. This commit generalises the node roles docs slightly to
clarify this.

Relates #70435
2021-03-18 12:29:52 +00:00
James Rodewig 38edcb65ae
[DOCS] Document `index.query.default_field` index setting (#69922) 2021-03-17 17:11:25 -04:00
James Rodewig a2f20b7903
[DOCS] Remove `type` glossary xrefs (#70520) 2021-03-17 17:04:37 -04:00
James Rodewig d8a78b9d26
[DOCs] Add tip for `index_options` parameter (#70450) (#70498)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: yudidi <972656027@qq.com>
2021-03-17 10:43:41 -04:00
Benjamin Trent 10e637d97c
[ML] allow documents to be out of order within the same time bucket (#70468)
This commit allows documents seen within the same time bucket to be out of order.

This is already supported within the native process.

Additionally, when recording the "latest" record timestamp, we were assuming that the latest seen document was truly the "latest". This is not really the case if latency is utilized or if documents come out of order within the same bucket.
2021-03-17 09:34:49 -04:00
Jim Ferenczi 701abc6bea
Change default format for date_nanos field (#70463)
This commit updates the default format of date_nanos field
on existing and new indices to use `strict_date_optional_time_nanos` instead of
`strict_date_optional_time`.
Using `strict_date_optional_time` as the default format for date_nanos doesn't
make sense because it accepts and parses dates with nanosecond precision,
but when it formats it drops the nanoseconds.
The change should be transparent for users, these formats accept the same input.

Relates #69192
Closes #67063
2021-03-17 11:40:32 +01:00
Nhat Nguyen 8b5aa84647
Allow format sort values of date fields (#70357)
If a search after request targets multiple indices and some of its sort 
field has type `date` in one index but `date_nanos` in other indices,
then Elasticsearch won't interpret the search_after parameter correctly
in every target index. The sort value of a date field by default is a
long of milliseconds since the epoch while a date_nanos field is a long
of nanoseconds.

This commit introduces the `format` parameter in the sort field so a 
sort value of a date or date_nanos will be formatted using a date format
in a search response.

The below example illustrates how to use this new parameter.

```js
{
    "query": {
        "match_all": {}
    },
    "sort": [
        {
            "timestamp": { 
                "order": "asc",
                "format": "strict_date_optional_time_nanos"
           }
        }
    ]
}
```

```js
{
    "query": {
        "match_all": {}
    },
    "sort": [
        {
            "timestamp": { 
                "order": "asc",
                "format": "strict_date_optional_time_nanos"
            }
        }
    ],
    "search_after": [
        "2015-01-01T12:10:30.123456789Z" // in `strict_date_optional_time_nanos` format
    ]
}
```

Closes #69192
2021-03-16 21:27:51 -04:00
Fabien Caylus 34176844b7
[DOCS] Fix Lucene's stop words links (#70405) 2021-03-16 17:06:12 -04:00
Lisa Cawley 5eca57e9dd
[DOCS] Remove beta qualifier from transform tutorial (#70469) 2021-03-16 12:13:06 -07:00
Yannick Welsch 9910c7a359
Extend searchable snapshots feature usage stats (#70441)
Extends the feature usage stats, distinguishing between full_copy and shared_cache style searchable snapshot indices.
2021-03-16 18:02:34 +01:00
István Zoltán Szabó fead5bbb97
[DOCS] Fixes typo in async search API docs. (#70448) 2021-03-16 14:36:12 +01:00
James Rodewig 5c75d004fa
[DOCS] Replace `put` with `create or update` in API names (#70330)
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-15 14:49:44 -04:00
James Rodewig eee4fe2a86
[DOCS] Fix Java date pattern in ingest pipeline example (#70420) 2021-03-15 14:08:37 -04:00
Adam Locke f2cd547364
[DOCS] Removing wildcard from DELETE index template request (#70418) 2021-03-15 13:44:24 -04:00
James Rodewig a7be05d7af [DOCS] Add newline to processor list 2021-03-15 12:35:37 -04:00
James Rodewig 010a973018
[DOCS] Refactor ingest pipeline docs (#70253) 2021-03-15 12:22:57 -04:00
Adam Locke ebeb0a9d4c
[DOCS] Add runtime fields to index templates (#70172)
* [DOCS] Add runtime fields to index templates

* Apply suggestions from code review

Co-authored-by: debadair <debadair@elastic.co>

* Deemphasize runtime fields and Kibana.

* Remove duplicate timestamp from component template.

Co-authored-by: debadair <debadair@elastic.co>
2021-03-15 11:50:10 -04:00
James Rodewig fdad88ecf8
[DOCS] Replace version-specific links in release highlights (#70317) (#70386) 2021-03-15 10:20:12 -04:00
James Rodewig d51a04cd8c
[DOCS] Add operator privileges to APIs and settings (#69903) 2021-03-15 09:20:09 -04:00
Martijn van Groningen 715eb90fea
Support specifying multiple templates names in delete component template api (#70314)
Add support to delete component templates api to specify multiple template
names separated by a comma.

Change the cleanup template logic for rest tests to remove all component templates via a single delete component template request. This to optimize the cleanup logic. After each rest test we delete all templates. So deleting templates this via a single api call (and thus single cluster state update) saves a lot of time considering the number of rest tests.

Older versions don't support component / composable index templates
and/or data streams. Yet the test base class tries to remove objects
after each test, which adds a significant number of lines to the
log files (which slows the tests down). The ESRestTestCase will
now check whether all nodes have a specific version and then decide
whether data streams and component / composable index templates will
be deleted.

Also ensured that the logstash-index-template and security-index-template
aren't deleted between tests, these templates are builtin templates that
ES will install if missing. So if tests remove these templates between tests
then ES will add these template back almost immediately. These causes
many log lines and a lot of cluster state updates, which slow tests down.

Relates to #69973

Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
2021-03-15 13:08:49 +01:00
Jason Tedor cfad8376f4
Clarify remote_cluster_client role (#70186)
This commit addresses two aspects of the description in the docs of
configuring a local node to be a remote cluster client. First, the
documentation was referring to the legacy setting for configuring a
remote cluster client. Secondly, we clarify that additional features,
not only cross-cluster search, have requirements around the usage of the
remote_cluster_client role.

Co-authored-by: Przemysław Witek <przemyslaw.witek@elastic.co>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-11 20:28:26 -05:00
Martijn van Groningen 36044ddb11
Support specifying multiple templates names in delete composable index template api (#70094)
Add support to delete composable index templates api to specify multiple template
names separated by a comma.

Change to cleanup template logic for rest tests to remove all composable index templates via a single delete composable index template request. This to optimize the cleanup logic. After each rest test we delete all templates. So deleting templates this via a single api call (and thus single cluster state update) saves a lot of time considering the number of rest tests.

If this pr is accepted then I will do the same change for the delete component template api.

Relates to #69973
2021-03-11 10:52:28 +01:00
Mayya Sharipova 1de0b616eb
Add positive_score_impact to rank_features type (#69994)
rank_features field type misses positive_score_impact parameter
that rank_feature type has. This adds this parameter.

Closes #68619
2021-03-10 14:55:54 -05:00
James Rodewig 75b0917ca1
[DOCS] Fix EQL heading levels (#70255)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-10 14:20:22 -05:00
István Zoltán Szabó a3fdaceeb1
[DOCS] Expands transforms docs with CCS info (#70156)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-10 15:54:31 +01:00
István Zoltán Szabó 59f6280a7b
[DOCS] Changes deprecated syntax to node.role style in datafeed docs. (#70201) 2021-03-10 15:46:01 +01:00
James Rodewig 2883d37443
[DOCS] Add overview for rollup refactor (#70001) 2021-03-10 08:41:27 -05:00
James Rodewig 8d4ef1e38e
[DOCS] Update ingest pipeline xrefs (#70178) 2021-03-10 08:28:19 -05:00
James Rodewig 468c68f6e7
[DOCS] Remove pipeline param from delete API (#70177) 2021-03-10 08:20:17 -05:00
Yang Wang 4c090aeeb4
Improve user check for resource sharing and its documentation (#69844)
The user check when accessing shared resources is improved to be more accurate. 
Also add documentation about how it works and its limitations.
2021-03-10 21:55:50 +11:00
Ioannis Kakavas 2b48bd789a
Add doc reference for client_auth_method (#70124)
Support for additional Client authentication methods was added in
the OIDC realm in #58708. This change adds the `rp.client_auth_method`
and `rp.client_auth_signature_algorithm` settings in the realm settings 
reference doc.
2021-03-10 12:34:01 +02:00
Ioannis Kakavas 060b3aadd6
Remove references to type parameter for realms (#70011)
Type configuration parameter was removed in 7.0. This change cleans
up some sentences where references to it had remained even after
we removed the parameter itself.
2021-03-10 12:01:20 +02:00
Lisa Cawley 2caba7b11f
[DOCS] Edits machine learning settings (#69947)
Co-authored-by: David Roberts <dave.roberts@elastic.co>
2021-03-09 10:59:12 -08:00
Lee Hinman 67f13bb679
Restrict ILM frozen phase to searchable snapshot actions only (#70158)
This commit changes the frozen phase within ILM in the following ways:

- The `searchable_snapshot` action now no longer takes a `storage` parameter. The storage type is
determined by the phase within which it is invoked (shared cache for frozen and full copy for
everything else).
- The frozen phase in ILM now no longer allows *any* actions other than `searchable_snapshot`
- If a frozen phase is provided, it *must* include a `searchable_snapshot` action.

These changes may seem breaking, but since they are intended to go back to 7.12 which has not been
released yet, they are not truly breaking changes.
2021-03-09 11:24:04 -07:00
James Rodewig 71bb0c7714 [DOCS] Reword `ingest` description 2021-03-09 13:14:23 -05:00
James Rodewig d68b140679
[DOCS] Clarify supported rollup fields (#70045) 2021-03-09 12:13:58 -05:00
István Zoltán Szabó c226958947
[DOCS] Expands anomaly detection alert type docs (#70026)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2021-03-09 12:02:16 +01:00
Lisa Cawley c537e5f38c
[DOCS] Edits delete trained model alias API (#70119) 2021-03-08 17:08:58 -08:00
Julie Tibshirani 796284a190
Move flattened field to core. (#68780)
This field mapper only lived in its own module so it could be licensed as x-pack
basic. Now it can be moved to core, which matches its status as a core type.
2021-03-08 16:56:16 -08:00
Julie Tibshirani da668e134a
Correct cross_fields docs on how analyzer groups are combined. (#69936)
When performing a multi_match in cross_fields mode, we group fields based on
their analyzer and create a blended query per group. Our docs claimed that the
group scores were combined through a boolean query, but they are actually
combined through a dismax that incorporates the tiebreaker parameter.

This commit updates the docs and adds a test verifying the behavior.
2021-03-08 14:56:17 -08:00
James Rodewig 5bf7a0a995 [DOCS] Add fields param xref 2021-03-08 16:40:11 -05:00
Lee Hinman 5df763fc66
Reject creating ILM policies with phase timings are not >= previous phase (#70089)
It can be confusing to configure policies with phase timings that get smaller, because phase timings
are absolute. To make things a little clearer, this commit now rejects policies where a configured
min_age is less than a previous phase's min_age.

This validation is added only to the PutLifecycleAction.Request instead of the
TimeseriesLifecycleType class because we cannot do this validation every time a lifecycle is
created or else we will block cluster state from being recoverable for existing clusters that may
have invalid policies.

Resolves #70032
2021-03-08 12:40:20 -07:00
James Rodewig 53574d2778
[DOCS] Reformat adjacency matrix agg reference (#70034) 2021-03-08 12:33:46 -05:00
James Rodewig f1e911d13d
[DOCS] Add guidance for mapping unstructured content (#69079) 2021-03-08 12:31:42 -05:00
David Turner 3aa8ded328
Snapshot process details docs improvements (#70012)
- adds a bit more overview on the process, including noting that it
works in terms of files

- notes that the snapshot is a point-in-time view of each shard, and not
necessarily exactly at the start of the snapshot process

- documents the `snapshot.max_concurrent_operations` setting

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-08 14:42:06 +00:00
James Rodewig 79828761bc
[DOCS] Fix `prefix_length` data type (#70075) 2021-03-08 09:19:00 -05:00
Mayya Sharipova aab3f3021a
Remove size of dense_vector (#70024)
Remove not completely correct statement about the size of dense_vectors

We do store a dense_vector as binary doc value  with size `4*dims+4`.
But this is size before compression. As compressed size depends on
data itself, it is better to remove completely any statement
about the size.
2021-03-08 07:49:06 -05:00
Francisco Fernández Castaño ae5308c638
Add support for range reads and retries to URL repositories (#69521) 2021-03-08 13:14:12 +01:00
Luca Cavanna ffe61fb097
Move runtime fields stats to server (#69487)
Runtime fields usage is currently reported as part of the xpack feature usage API. Now that runtime fields are part of server, their corresponding stats can be moved to be part of the ordinary mapping stats exposed by the cluster stats API.
2021-03-08 12:38:20 +01:00
István Zoltán Szabó 8a7aced8e8
[DOCS] Adds beta tag to anomaly detection alert docs. (#70013) 2021-03-08 10:46:24 +01:00
Joe Gallo f93242a5f9
Switch built-in policies to max_primary_shard_size (#69995) 2021-03-04 17:00:45 -05:00
István Zoltán Szabó 2ccc81081f
[DOCS] Adds hyperparameters option to the include setting of GET trained models API. (#69959) 2021-03-04 16:43:06 +01:00
István Zoltán Szabó 300031b247
[DOCS] Removes beta from latest Transform docs. (#69964) 2021-03-04 16:36:47 +01:00
James Rodewig e432934e82
[DOCS] Document PIT security for aliases (#69572) 2021-03-04 08:42:42 -05:00
Lee Hinman 25c0ad154e
Fix docs/reference/cat.asciidoc to use consistent order (#69938)
This test was sorting by store.size, but these indices could end up with the same store size and
then the sorting would occasionally be wrong for the test.

Resolves #51619
2021-03-03 16:41:16 -07:00
Lisa Cawley 8c0439f803
[DOCS] Add operator privileges to ML settings (#69766) 2021-03-03 08:20:39 -08:00
Christoph Büscher 6011d99b14
[DOCS] Improve tip about updating search_analyzer (#69621)
The tip about updating a `search_analyzer` currently does not mention that most
of the time (when the current analyzer is not "default"), user need to repeat
the currently set "analyzer" parameter in the field definition. Adding this as a
short note.
2021-03-03 16:31:29 +01:00
Nik Everett fe457f156d
Docs: Call out that you can't update analyzer (#69889)
You can't update the `analyzer` parameter in the PUT mappings API even if
the index is closed. This adds a TIP to call that out. And adds a TIP
for `search_quote_analyzer` which you *can* update.
2021-03-03 10:28:55 -05:00
Joe Gallo 1e8b5fa7c2
Remove the _ml/find-file-structure docs (#69823) 2021-03-03 09:49:28 -05:00
James Rodewig 67288a1e4d [DOCS] Fix gap policy xref 2021-03-03 09:31:02 -05:00
Mike Barretta d6047a966f
[DOCS] Fix typo (#69838) 2021-03-03 09:16:39 -05:00
James Rodewig 630604bd45
[DOCS] Fix case sensitivity for elision token filter (#69873) 2021-03-03 09:09:05 -05:00
James Rodewig d6492c6392 [DOCS] Reword `terms` rollup config 2021-03-02 16:08:51 -05:00
James Rodewig e21cab640f
[DOCS] Reformat avg bucket agg reference (#69751) 2021-03-02 13:44:43 -05:00
Gordon Brown ce8a0c0cea
Change Get Snapshottable Features endpoint to `_features` (#69755)
The endpoint `_snapshottable_features` is long and implies incorrect
things about this API - it is used not just for snapshots, but also for
the upcoming reset API. Following discussions on the team, this commit
changes the endpoint to `_features` and removes the connection between
this API and snapshots, as snapshots are not the only use for the output
of this API.
2021-03-02 11:30:02 -07:00
Nik Everett ea131e5f5a
Docs: Switch terms agg scripting to runtime fields (#69628)
We expect runtime fields to perform a little better than our "native"
aggregation script so we should point folks to them instead of the
"native" aggregation script.
2021-03-02 11:27:21 -05:00
Andrei Stefan bf1b7a36b5
SQL: Adapt the limitations page to the new "fields" API usage (#69616)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-02 17:19:32 +02:00
Lisa Cawley 4c39136837
[DOCS] Fix link in machine learning nightly maintenance setting (#69760) 2021-03-01 17:14:21 -08:00
James Rodewig 3c70b0e3d0
[DOCS] Add xref for runtime fields (#69738) 2021-03-01 16:14:23 -05:00
Lyudmila Fokina ee66d6f11f
Support audit ignore policy by actions (#67477)
* Support audit ignore policy by index privileges

Adding new audit ignore policy - privileges
For example, following policy will filter out all events, which actions
minimal required privilege is either "read" or "delete":

xpack.security.audit.logfile.events.ignore_filters:
  example:
    privileges: ["read", "delete"]

Resolve: #60877
Related: #10836
Related: #37148

* Support audit ignore policy by index privileges

Adding new audit ignore policy - privileges
For example, following policy will filter out all events, which actions
required privilege is either "read" or "delete":

xpack.security.audit.logfile.events.ignore_filters:
  example:
    privileges: ["read", "delete"]

Resolve: #60877
Related: #10836
Related: #37148

* To avoid ambiguity (as cluster and index policies may have the same
name) changing implementation to have to separate policies for
`index_privileges` and `cluster_privileges`.
If both are set for the same policy, throw the IllegalArgumentException.

* To avoid ambiguity (as cluster and index policies may have the same
name) changing implementation to have to separate policies for
`index_privileges` and `cluster_privileges`.
If both are set for the same policy, throw the IllegalArgumentException.

* Fixing Api key related privilege check which expects request and
authentication by introducing overloaded
version of findPrivilegesThatGrant
just checking if privileges which can grant the action regardless of the
 request and authentication context.

* Fixing a test; adding a caching mechanism to avoid calling
findPrivilegesThatGrant each
 time.

* Support audit ignore policy by index privileges

Addressing review feedback

* Support audit ignore policy by index privileges

Addressing review comments + changing approach:
- use permission check instead of simple "checkIfGrants"
- adding more testing

* Support audit ignore policy by index privileges

Addressing review comments + changing approach:
- use permission check instead of simple "checkIfGrants"
- adding more testing

* Support audit ignore policy by index privileges

Addressing review comments + changing approach:
- use permission check instead of simple "checkIfGrants"
- adding more testing

* Support audit ignore policy by index privileges

Addressing review comments + changing approach:
- use permission check instead of simple "checkIfGrants"
- adding more testing

* Revert "Support audit ignore policy by index privileges"

This reverts commit 152821e7

* Revert "Support audit ignore policy by index privileges"

This reverts commit 79649e9a

* Revert "Support audit ignore policy by index privileges"

This reverts commit 96d22a42

* Revert "Support audit ignore policy by index privileges"

This reverts commit 67574b2f

* Revert "Support audit ignore policy by index privileges"

This reverts commit 35573c8b

* Revert "Fixing a test; adding a caching mechanism to avoid calling findPrivilegesThatGrant each  time."

This reverts commit 7faa52f3

* Revert "Fixing Api key related privilege check which expects request and authentication by introducing overloaded version of findPrivilegesThatGrant just checking if privileges which can grant the action regardless of the  request and authentication context."

This reverts commit 72b9aefe

* Revert "To avoid ambiguity (as cluster and index policies may have the same name) changing implementation to have to separate policies for `index_privileges` and `cluster_privileges`. If both are set for the same policy, throw the IllegalArgumentException."

This reverts commit 7dd8fe7d

* Revert "To avoid ambiguity (as cluster and index policies may have the same name) changing implementation to have to separate policies for `index_privileges` and `cluster_privileges`. If both are set for the same policy, throw the IllegalArgumentException."

This reverts commit cb5bc09c

* Revert "Support audit ignore policy by index privileges"

This reverts commit a918da10

* Support audit ignore policy by actions

Getting back to action filtering

* Support audit ignore policy by actions

Cleaning up some tests

* Support audit ignore policy by actions

Cleaning up some tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-01 18:44:57 +01:00
Benjamin Trent 2279cafb4e
[ML] adding new _preview endpoint for data frame analytics (#69453)
This commit adds a new `_preview` endpoint for data frame analytics. 

This allows users to see the data on which their model will be trained. This is especially useful 
in the arrival of custom feature processors.

The API design is a similar to datafeed `_preview` and data frame analytics `_explain`.
2021-03-01 12:25:50 -05:00
James Rodewig 783769d8d9
[DOCS] Add `fields` parameter to EQL search API (#69634) 2021-03-01 12:00:27 -05:00
Yannick Welsch 529c6227fe
Support include_unloaded_segments in node stats (#69682)
Adds support for the include_unloaded_segments flag in node stats, which helps with understanding resource usage of
shared_cache-style searchable snapshots on a per-node basis.
2021-03-01 17:18:47 +01:00
José Arthur Benetasso Villanova 3b1c03dc49
[DOCS] Fix typo (#69654) 2021-03-01 09:34:56 -05:00
James Rodewig cb25ae06ed
[DOCS] Fix name of `cluster_version` parameter (#69615) 2021-03-01 08:54:47 -05:00
RomainGeffraye fe7afb9d36
[DOCS] Update example for `serial_diff` agg (#69635) 2021-03-01 08:37:29 -05:00
David Turner 86b97ab5c9
Note that forcemerges now run in parallel in docs (#69688)
Relates #69416
2021-03-01 13:15:24 +00:00
István Zoltán Szabó 88bc27592d
[DOCS] Reviews ML decider conceptual docs (#69524)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-01 09:56:39 +01:00
James Rodewig 593cac391d [DOCS] Make whitespace consistent in JSON snippets 2021-02-25 16:12:47 -05:00
James Rodewig 3ff1a17a79
[DOCS] EQL: Document field existence checks (#69614) 2021-02-25 12:04:22 -05:00
Lisa Cawley efa9b095aa
[DOCS] Adds model alias to inference processor and agg (#69576) 2021-02-24 13:12:39 -08:00
Tal Levy c1c5103756
Generate random rollup index names for RollupILMAction (#69237)
This commit moves away from the static `rollup-{indexName}` rollup index
naming strategy and moves towards a randomized rollup index name scheme.

This will reduce the complications that exist if the RollupStep fails and retries
in any way. A separate cleanup will still be required for failed temporary indices,
but at least there will not be a conflict.

This commit generates the new rollup index name in the LifecycleExecutionState so
that it can be used in RollupStep and UpdateRollupIndexPolicyStep on a per-index
basis.
2021-02-24 12:31:36 -08:00
Adam Locke 1ee4c50217
[DOCS] Remove beta admonition for runtime fields. (#69550)
* [DOCS] Remove beta admonition for runtime fields.

* Remove other beta admonition from Painless guide.
2021-02-24 11:35:11 -05:00
Lisa Cawley 138224b398
[DOCS] Edits trained model alias API (#69491) 2021-02-24 08:17:49 -08:00
James Rodewig 2048eb7eef
[DOCS] Note `index.number_of_routing_shards` affects doc distribution (#69541) 2021-02-24 10:31:01 -05:00
Dimitris Athanasiou bbf81a2603
[ML] Expand usage stats for data frame analytics and trained models (#69477)
This adds additional statistics into the usage API for data frame analytics
and trained models.

For data frame analytics the added stats are:

  - count of jobs by analysis type
  - stats for peak_usage_bytes

For trained models the added stats are:
  - counts of: total, prepackaged, other (not created by data frame analytics)
  - counts by analysis type based on the inference config
  - stats for estimated heap usage
  - stats for estimated number of operations
2021-02-24 15:45:26 +02:00
David Turner e88038575d
Document searchable snapshots supported repos (#69508)
Adds a note listing the repository types that can be used with
searchable snapshots.
2021-02-24 09:02:16 +00:00
Igor Motov 7ad0201b25
Clarify the intended use case for multi_terms aggs (#69397)
This PR clarifies when multi_terms aggs should be used instead of composite
aggs or nested term aggs.

Relates to #65623
2021-02-23 15:11:53 -05:00
Benjamin Trent 1438434b6c
[Transform] add support for geo_line aggregation in pivot function (#69299)
This commit adds support for the Gold+ licensed `geo_line` aggregation.

This aggregation takes a collection of `geo_point` values and constructs a line
according to some sort value. Adding to transforms allows users to create these
potentially expensive lines out of band of visualizations and then do additional aggs/queries
against the pivoted data. 

Examples would be:

"Do these daily user paths ever intersect?"
"Does this path enter and leave this area?"
2021-02-23 14:53:36 -05:00
James Rodewig 35c02c45f7
[DOCS] Note `case_sensitive` param was added in 7.10 (#69405) (#69466)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Bhavya Gupta <46423346+bhavya121999@users.noreply.github.com>
2021-02-23 13:12:28 -05:00
Adam Locke 2362549818
[DOCS] Adding grok support for runtime fields. (#69308)
* [DOCS] Adding grok support for runtime fields.

* Update response.

* Adding testresponse replacements.

* Update runtime field context and add dissect.

* Fixing backslash in the response.

* Fixing testresponse.

* Incorporating review feedback.

* Updates emit and adds cross link from ES runtime fields page.
2021-02-23 12:47:11 -05:00
James Rodewig 5ff8b8c730
[DOCS] Remove outdated default distro refs (#69465) 2021-02-23 12:26:57 -05:00
James Rodewig a32cf65705
[DOCS] Reword node roles docs (#69301) 2021-02-23 11:32:46 -05:00
James Rodewig 9af74ec561
[DOCS] Remove added admons (#69452) 2021-02-23 10:35:21 -05:00
James Rodewig a85f9cade8
[DOCS] Use consistent @timestamp field name (#69435) (#69448)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Koji Kawamura <ijokarumawak@users.noreply.github.com>
2021-02-23 10:20:17 -05:00
István Zoltán Szabó b4057d7c22
[DOCS] Adds new screenshot to Transform tutorial (#69194)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-02-23 15:23:51 +01:00
Marios Trivyzas c5cd7e51ef
SQL: [Docs] Use the most common `yyyy` year pattern in examples (#69407)
To avoid confusion for the users replace the `YYYY` and `uuuu` year
patterns in the examples of `DATETIME_FORMAT/PARSE` with the most common
`yyyy` to avoid any confusion for users that might just copy paste those
queries for their own use case.

Relates to #68030
2021-02-23 13:48:03 +01:00
István Zoltán Szabó 77d0f56581
[DOCS] Adds anomaly detection alert documentation (#68923)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-02-23 10:29:54 +01:00
Lisa Cawley 50fd9e40a7
[DOCS] Fixes italics and capitalization (#69387) 2021-02-22 13:20:06 -08:00
David Turner bb3ea99850
Skip zone/host awareness with auto-expand replicas (#69334)
Today if an index is set to `auto_expand_replicas: N-all` then we will
try and create a shard copy on every node that matches the applicable
allocation filters. This conflits with shard allocation awareness and
the same-host allocation decider if there is an uneven distribution of
nodes across zones or hosts, since these deciders prevent shard copies
from being allocated unevenly and may therefore leave some unassigned
shards.

The point of these two deciders is to improve resilience given a limited
number of shard copies but there is no need for this behaviour when the
number of shard copies is not limited, so this commit supresses them in
that case.

Closes #54151
Closes #2869
2021-02-22 16:53:58 +00:00
James Rodewig a453a9267d
[DOCS] Add frozen node to cat nodes API (#69228) 2021-02-22 11:24:21 -05:00
James Rodewig b7aaaad20a
[DOCS] Improve docs for `geo_shape` field type's `circle` type (#69285) 2021-02-22 10:24:24 -05:00
James Rodewig e4962994ff
[DOCS] Remove performance warning for script fields (#69309) 2021-02-22 10:05:49 -05:00
Henning Andersen d4a7aa26c1
Autoscaling test scale from empty with node attrs (#68730)
Autoscaling expects data tiers to be used exclusively both for node
roles and in ILM policies. This commit adds a test demonstrating that
as well as documentation for the behavior.
2021-02-22 15:47:15 +01:00
James Rodewig 0cbab23e80
[DOCS] Update ILM tutorial docs for UI changes (#69189) 2021-02-19 12:56:58 -05:00
Dimitris Athanasiou 7fb98c0d3c
[ML] Add runtime mappings to data frame analytics source config (#69183)
Users can now specify runtime mappings as part of the source config
of a data frame analytics job. Those runtime mappings become part of
the mapping of the destination index. This ensures the fields are
accessible in the destination index even if the relevant data frame
analytics job gets deleted.

Closes #65056
2021-02-19 16:29:19 +02:00
Jean-Louis Leysens 867e656df7
[ILM][Docs] Updated existing screenshots (#69173)
* updated existing screenshots

* change 365 days -> 90 days for customize policy tutorial
2021-02-19 10:11:36 +01:00
Joe Gallo 7e7c5db74e
Rename max_single_primary_size to max_primary_shard_size (#69239) 2021-02-18 21:13:58 -05:00
James Rodewig 8e09c3d7bd
[DOCS] EQL: Clarify support for text fields (#69229) 2021-02-18 18:57:49 -05:00
James Rodewig 31fc59efdf
[DOCS] Fix capitalization for Query DSL (#69236) 2021-02-18 18:57:19 -05:00
Adam Locke a689d3f6cd
[DOCS] Add runtime field to glossary (#69204)
* [DOCS] Add runtime field to glossary

* Update links with external refs

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-02-18 15:00:07 -05:00
Benjamin Trent 0af38bba9e
[ML] add new delete trained model aliases API (#69195)
In addition to creating and re-assigning model aliases, users should be able to delete existing and unused model aliases.
2021-02-18 13:12:07 -05:00
David Turner d3e0a571eb
URL repos and searchable snapshots don't mix (#69197)
Provides docs and a better error message regarding using URL
repositories with searchable snapshots.

Relates #68918
2021-02-18 17:50:50 +00:00
Lisa Cawley 55f0e32fe4
[DOCS] Clarify put data frame analytics API feature processors option (#69158) 2021-02-18 08:53:46 -08:00
Andrei Dan 4bf09f66d8
[DOCS] Remove beta label from searchable_snapshot ILM action docs (#69196)
Searchable snapshots are GA since 7.11

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-02-18 16:06:09 +00:00
Benjamin Trent 26eef892df
[ML] adds new trained model alias API to simplify trained model updates and deployments (#68922)
A `model_alias` allows trained models to be referred by a user defined moniker. 

This not only improves the readability and simplicity of numerous API calls, but it allows for simpler deployment and upgrade procedures for trained models. 

Previously, if you referenced a model ID directly within an ingest pipeline, when you have a new model that performs better than an earlier referenced model, you have to update the pipeline itself. If this model was used in numerous pipelines, ALL those pipelines would have to be updated. 

When using a `model_alias` in an ingest pipeline, only that `model_alias` needs to be updated. Then, the underlying referenced model will change in place for all ingest pipelines automatically. 

An additional benefit is that the model referenced is not changed until it is fully loaded into cache, this way throughput is not hampered by changing models.
2021-02-18 09:41:50 -05:00
Joe Gallo d24f5cbc91
Add max_single_primary_size as a condition for the ILM rollover action (#68917) 2021-02-18 09:28:58 -05:00
James Rodewig 6e215ee4b1
[DOCS] Fix instructions for dedicated ingest node (#69179) 2021-02-18 08:53:20 -05:00
Jason Tedor d3ac7c9806
Remove support for JAVA_HOME (#69149)
This commit removes support for JAVA_HOME. As we previously deprecated
usage of JAVA_HOME to override the path for the JDK, this commit follows
up by removing support for JAVA_HOME. Note that we do not treat
JAVA_HOME being set as a failure, as it is perfectly reasonable for a
user to have JAVA_HOME configured at the system level.
2021-02-17 20:22:44 -05:00
Jason Tedor 0cd4863585
Introduce ES_JAVA_HOME (#68954)
This commit introduces a dedicated envirnoment variable ES_JAVA_HOME to
determine the JDK used to start (if not using the bundled JDK). This
environment variable will replace JAVA_HOME. The reason that we are
making this change is because JAVA_HOME is a common environment variable
and sometimes users have it set in their environment from other JDK
applications that they have installed on their system. In this case,
they would accidentally end up not using the bundled JDK despite their
intentions. By using a dedicated environment variable specific to
Elasticsearch, we avoid this potential for conflict. With this commit,
we introduce the new environment variable, and deprecate the use of
JAVA_HOME. We will remove support for JAVA_HOME in a future commit.
2021-02-17 12:41:23 -05:00
S. J. Lee 42bca5bfc2
[DOCS] Relocate scriptless runtime document (#68916)
* Reallocate runtime document

Reallocate document `runtime-fields-scriptless` from `runtime-search-request` to `runtime-mapping-fields`

* Move runtime without script section

Move runtime without script section to under the dynamic runtime mapping section

* Fix snippet formatting and remove discrete heading.

* Update test snippet.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-02-17 12:38:06 -05:00
Nik Everett 1195b20a83
Docs: Add example fetching keyword in top_metrics (#69135)
Adds an example of fetching a keyword field.
2021-02-17 12:10:34 -05:00
Jim Ferenczi ab7dd46f9f
Add automatic tiebreaker for search requests that use a PIT (#68833)
This PR adds the special `_shard_doc` sort tiebreaker automatically to any
search requests that use a PIT. Adding the tiebreaker ensures that any
sorted query can be paginated consistently within a PIT.

Closes #56828
2021-02-17 17:37:52 +01:00
James Rodewig 9b88ae92e6
[DOCS] Fix typos for duplicate words (#69125) 2021-02-17 10:34:20 -05:00
James Rodewig 13a077bd59
[DOCS] EQL: Update differences from Endgame EQL syntax (#69124) 2021-02-17 10:11:51 -05:00
David Turner 0ca9f6a4f0
Adjust repository analyzer docs (#69107)
Fixes a handful of typos/wording issues, and adds the new human-readable
fields to the response format docs.

Relates #67247
2021-02-17 13:50:42 +00:00
Dario Gieselaar a28e45c0c5
[DOCS] Remove keyword/ip from list of unsupported fields in top_metrics agg (#69036) 2021-02-17 08:41:57 -05:00
David Turner 8abc3fb796
Fix docs for behaviour of CCR after lease expiry (#69114)
Today we imply that CCR will automatically fall back to a full index
copy if it cannot replay any missing history. This was true for earlier
versions of the design but we ultimately decided not to do this without
adjusting the docs to match. This commit fixes the docs.
2021-02-17 13:26:48 +00:00
Lisa Cawley a1fb2c3606
[DOCS] Fixes n_gram_encoding in data frame analytics APIs (#69084) 2021-02-16 14:02:00 -08:00
Luca Cavanna bd3467a305
Add the ability to remove a runtime field (#68992)
Currently, existing runtime fields can be updated, but they cannot be removed. That allows to correct potential mistakes, but once a runtime field is added to the index mappings, it is not possible to remove it.

With this commit we introduce the ability to remove an existing runtime field by providing a null value for it through the put mapping API. If a field with such name does not exist, such specific instruction will have no effect on other existing runtime fields.

Note that the removal of runtime fields makes the recently introduced assertRefreshItNotNeeded assertion trip, because when each local node merges mappings back in, the runtime fields that were previously removed by the master node, get added back again locally. This is only a problem for the assertion that verifies that the removed refresh operation is never needed. We worked around this by tweaking the assertion to ignore runtime fields completely, for simplicity, by assertion on the serialized merged mappings and incoming mappings without the corresponding runtime section.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-02-16 21:00:16 +01:00
James Rodewig 5eb0a9528a
[DOCS] EQL: Document `like` and `regex` keywords (#68932) (#69052) 2021-02-16 11:34:03 -05:00
James Rodewig 14ea0072e9
[DOCS] Update priority recommendation for index templates (#69006) 2021-02-16 10:53:28 -05:00
James Rodewig 8f582c1cd7
[DOCS] Add EQL glossary def (#68938) 2021-02-16 10:17:57 -05:00
David Turner 92d13a3f7d
Introduce repository test kit/analyser (#67247)
Today we rely on blob stores behaving in a certain way so that they can be used
as a snapshot repository. There are an increasing number of third-party blob
stores that claim to be S3-compatible, but which may not offer a suitably
correct or performant implementation of the S3 API. We rely on somesubtle
semantics with concurrent readers and writers, but some blob stores may not
implement it correctly. Hitting a corner case in the implementation may be rare
in normal use, and may be hard to reproduce or to distinguish from an
Elasticsearch bug.

This commit introduces a new `POST /_snapshot/.../_analyse` API which exercises
the more problematic corners of the repository implementation looking for
correctness bugs and measures the details of the performance of the repository
under concurrent load.
2021-02-16 14:24:40 +00:00
Andrei Dan 9da3a6ee8d
ILM: enable the readonly action in the cold phase (#69024)
This enables the readonly ILM action in the cold phase.
2021-02-16 11:56:39 +00:00
Jim Ferenczi f67185f746
Add a cluster privilege to cancel tasks and delete async searches (#68679)
This change adds a new cluster privilege cancel_task that allows to:

Cancel running tasks (_tasks/_cancel).
Cancel and delete async searches.
Today the 'manage' cluster privilege is required to cancel tasks and
to delete async searches when security features are enabled.
This new focused privilege allows to handle tasks and searches only.

The change also adds the privilege to the internal 'kibana_system'
and '_async_search' roles. They both need to be able to cancel tasks
and delete async searches.

Relates #67965
2021-02-16 10:56:17 +01:00
Marios Trivyzas f9af60bf69
Add query param to limit highlighting to specified length (#67325)
Add a `max_analyzed_offset` query parameter to allow users
to limit the highlighting of text fields to a value less than or equal to the
`index.highlight.max_analyzed_offset`, thus avoiding an exception when
the length of the text field exceeds the limit. The highlighting still takes place,
but stops at the length defined by the new parameter.

Closes: #52155
2021-02-16 09:25:45 +01:00
Andrei Dan 800ae518f4
ILM: searchable snapshot executes before migrate in cold/frozen (#68861)
This moves the execution of the `searchable_snapshot` action before the
`migrate` action in the `cold` and `frozen` phases for more efficient
data migration (ie. mounting it as a searchable snapshot directly on the
target tier)

Now that searchable_snapshot can precede other actions in the same phase
(eg. in frozen it is followed by `migrate`) we need to allow the mounted
index to resume executing the ILM policy starting with a step that's part
of a new action (ie. migrate).

This adds support to resume the execution of the mounted index from another
action.

With older versions, the execution would resume from the PhaseCompleteStep
as it was the last action in a phase, which was handled as a special case
in the `CopyExecutionStateStep`. This  generalises the `CopyExecutionStateStep`
to be able to resume from any `StepKey`.
2021-02-15 09:35:11 +00:00
Lisa Cawley 8b6ec07613
[DOCS] Edits ML hyperparameter descriptions (#68880) 2021-02-11 11:55:28 -08:00
Gordon Brown 3f6472de74
Introduce "Feature States" for managing snapshots of system indices (#63513)
This PR expands the meaning of `include_global_state` for snapshots to include system indices. If `include_global_state` is `true` on creation, system indices will be included in the snapshot regardless of the contents of the `indices` field. If `include_global_state` is `true` on restoration, system indices will be restored (if included in the snapshot), regardless of the contents of the `indices` field. Index renaming is not applied to system indices, as system indices rely on their names matching certain patterns. If restored system indices are already present, they are automatically deleted prior to restoration from the snapshot to avoid conflicts.

This behavior can be overridden to an extent by including a new field in the snapshot creation or restoration call, `feature_states`, which contains an array of strings indicating the "feature" for which system indices should be snapshotted or restored. For example, this call will only restore the `watcher` and `security` system indices (in addition to `index_1`):

```
POST /_snapshot/my_repository/snapshot_2/_restore
{
  "indices": "index_1",
  "include_global_state": true,
  "feature_states": ["watcher", "security"]
}
```

If `feature_states` is present, the system indices associated with those features will be snapshotted or restored regardless of the value of `include_global_state`. All system indices can be omitted by providing a special value of `none` (`"feature_states": ["none"]`), or included by omitting the field or explicitly providing an empty array (`"feature_states": []`), similar to the `indices` field.

The list of currently available features can be retrieved via a new "Get Snapshottable Features" API:
```
GET /_snapshottable_features
```

which returns a response of the form:
```
{
    "features": [
        {
            "name": "tasks",
            "description": "Manages task results"
        },
        {
            "name": "kibana",
            "description": "Manages Kibana configuration and reports"
        }
    ]
}
```

Features currently map one-to-one with `SystemIndexPlugin`s, but this should be considered an implementation detail. The Get Snapshottable Features API and snapshot creation rely upon all relevant plugins being installed on the master node.

Further, the list of feature states included in a given snapshot is exposed by the Get Snapshot API, which now includes a new field, `feature_states`, which contains a list of the feature states and their associated system indices which are included in the snapshot. All system indices in feature states are also included in the `indices` array for backwards compatibility, although explicitly requesting system indices included in a feature state is deprecated. For example, an excerpt from the Get Snapshot API showing `feature_states`:
```
"feature_states": [
    {
        "feature_name": "tasks",
        "indices": [
            ".tasks"
        ]
    }
],
"indices": [
    ".tasks",
    "test1",
    "test2"
]
```

Co-authored-by: William Brafford <william.brafford@elastic.co>
2021-02-11 11:55:14 -07:00
James Rodewig 293fcd4c41
[DOCS] EQL: Minor doc fixes (#68927) 2021-02-11 13:44:01 -05:00
Christoph Büscher 3f267ad659
Add runtime field section to Field Capabilities API (#68904)
Currently runtime fields from search requests don't appear in the output of the
field capabilities API, but some consumer of runtime fields would like to see
runtime section just like they are defined in search requests reflected and
merged into the field capabilities output.
This change adds parsing of a "runtime_mappings" section equivallent to the one
on search requests to the `_field_caps` endpoint, passes this section down to
the shard level where any runtime fields defined here overwrite the mapping of
the targetet indices.

Closes #68117
2021-02-11 16:20:18 +01:00
István Zoltán Szabó 742facdfe6
[DOCS] Adds runtime filed related item to Transforms limitations (#68895) 2021-02-11 16:09:26 +01:00
Mayya Sharipova 6521d2af27
Introduce eql search status API (#68065)
Introduce eql search status API,
that reports the status of eql stored or async search.

GET _eql/search/status/<id>

The API is restricted to the monitoring_user role.

For a running eql search, a response has the following format:

{
  "id" : <id>,
  "is_running" : true,
  "is_partial" : true,
  "start_time_in_millis" : 1611690235000,
  "expiration_time_in_millis" : 1611690295000
}

For a completed eql search, a response has the following format:

{
  "id" : <id>,
  "is_running" : false,
  "is_partial" : false,
  "expiration_time_in_millis" : 1611690295000,
  "completion_status" : 200
}

Closes #66955
2021-02-11 09:30:13 -05:00
Igor Motov 0bbc6addd9
Revert "Remove aggregation's postCollect phase (#68615)
This partially reverts #64016 and  and adds #67839 and adds
additional tests that would have caught issues with the changes
in #64016. It's mostly Nik's code, I am just cleaning things up
a bit.

Co-authored-by: Nik Everett <nik9000@gmail.com>
2021-02-10 19:12:50 -05:00
Lisa Cawley 683368cc4d
[DOCS] Clarify soft_tree_depth_limit (#68787)
Co-authored-by: Tom Veasey <tveasey@users.noreply.github.com>
2021-02-10 12:51:01 -08:00
James Rodewig babf3eb081
[DOCS] EQL: Remove duplicate case-sensitivity info (#68860) 2021-02-10 14:27:29 -05:00
Marios Trivyzas 45677a385b
QL: Eliminate internal type DATETIME_NANOS (#68220)
Moving towards grouping of data types in the field caps API
the internal data type `DATETIME_NANOS` introduced for `date_nanos`
support is eliminated.

Relates: #67722
Follows: #67666
2021-02-10 18:15:54 +01:00
Andrei Stefan ee5cc5442a
QL: "fields" api implementation in QL (#68802)
* Integrate "fields" API into QL (#68467)
* QL: retry SQL and EQL requests in a mixed-node (rolling upgrade) cluster (#68602)
* Adapt nested fields extraction from "fields" API output to the new un-flattened structure (#68745)
2021-02-10 11:17:10 +02:00
James Rodewig c65615911f
[DOCS] Expand simple query string query's multi-position token section (#68753) 2021-02-09 16:07:02 -05:00
Christoph Büscher 8fff763148
[Docs] Add nested fields handling in fields API (#68657)
This change adds a paragraph on the different response format for nested fields
in the fields API and adds an example snippet.

Related to #63709
2021-02-09 18:09:58 +01:00
Adam Locke a39eef6309
[DOCS] Fixing Painless tests (#68157)
* Fixing Painless tests.

* Update runtime field context to fix test cases.

* Remove watcher logging from usage API and replace test.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-02-09 11:24:14 -05:00
Lee Hinman e552fd7ce6
Add support for partial searchable snapshots to ILM (#68714)
This commit adds support for the recently introduced partial searchable snapshot (#68509) to ILM.

Searchable snapshot ILM actions may now be specified with a `storage` option, specifying either
`full_copy` or `shared_cache` (similar to the "mount" API) to mount either a full or partial
searchable snapshot:

```json
PUT _ilm/policy/my_policy
{
  "policy": {
    "phases": {
      "cold": {
        "actions": {
          "searchable_snapshot" : {
            "snapshot_repository" : "backing_repo",
            "storage": "shared_cache"
          }
        }
      }
    }
  }
}
```

Internally, If more than one searchable snapshot action is specified (for example, a full searchable
snapshot in the "cold" phase and a partial searchable snapshot in the "frozen" phase) ILM will
re-use the existing snapshot when doing the second mount since a second snapshot is not required.

Currently this is allowed for actions that use the same repository, however, multiple
`searchable_snapshot` actions for the same index that use different repositories is not allowed (the
ERROR state is entered). We plan to allow this in the future in subsequent work.

If the `storage` option is not specified in the `searchable_snapshot` action, the mount type
defaults to "shared_cache" in the frozen phase and "full_copy" in all other phases.

Relates to #68605
2021-02-09 09:14:19 -07:00
James Rodewig adadf47819
[DOCS] Reuse ILM rollup action config (#68755) 2021-02-09 10:50:30 -05:00
David Turner 71763ca37f
Add docs on repository reliability and backups (#68740)
This commit spells out how important repository reliability is to
searchable snapshots, and also documents a procedure for taking a backup
of a snapshot repository.

Relates #54944
2021-02-09 14:57:06 +00:00
Dan Hermann 761b8aba8e
[DOCS] Fingerprint ingest processor (#68610) 2021-02-09 06:19:21 -06:00
Ignacio Vera f58d7854c5
Deprecate GeoPolygon query in favour of GeoShape query. (#64227) 2021-02-09 10:21:18 +01:00
Yannick Welsch e97f233fbe
Remove beta label from searchable snapshot docs (#68724)
This feature will go GA in 7.11.
2021-02-09 09:28:03 +01:00
István Zoltán Szabó 4443cb2f0e
[DOCS] Adds retention_policy to PUT Transform API docs (#68656)
Co-authored-by: lcawl <lcawley@elastic.co>
2021-02-09 08:00:47 +01:00
James Rodewig 5f3542a28e
[DOCS] Add `data_frozen` role to node docs (#68713) 2021-02-08 17:43:47 -05:00
James Rodewig c8fd4c5460
[DOCS] Add collapsible sections to multi search API docs (#68695)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-02-08 13:37:21 -05:00
James Rodewig b428743f02
[DOCS] Fix caps for search template API docs (#68696) 2021-02-08 13:24:02 -05:00
bellengao 4950bc4969
[DOCS] Format the multi search api doc (#68621) 2021-02-08 12:28:31 -05:00
James Rodewig e0935f658f
[DOCS] Note rollup metrics cannot be used in histogram (#68675) 2021-02-08 11:41:38 -05:00
Hendrik Muhs 54ed2e37d9
[Transform] implement retention policy to delete data from a transform (#67832)
add a retention policy to transform to delete data that is considered outdated as part of a
transform checkpoint.

fixes #67916
2021-02-08 15:06:15 +01:00
James Rodewig 0f5af55258
[DOCS] Update example request description (#68587) (#68658)
The doc is misleading : The following intervals search returns documents containing `my favorite food` **immediately** followed by `hot water` or `cold porridge`

max_gaps apply only to the match query and is not used for checking proximity with the other match, the example given actually`This search would match a my_text value of my favorite food is cold`

Co-authored-by: Julien Guay <guay_j@yahoo.fr>
2021-02-08 08:50:56 -05:00
István Zoltán Szabó 05e16428fe
[DOCS] Expands transforms docs with persistent tasks and related links. (#68582) 2021-02-08 09:44:06 +01:00
Lee Hinman 3f9f007545
Add the frozen tier node role and ILM phase (#68605)
This commit adds the `data_frozen` node role as part of the formalization of data tiers. It also
adds the `"frozen"` phase to ILM, currently allowing the same actions as the existing cold phase.

The frozen phase is intended to be used for data even less frequently searched than the cold phase,
and will eventually be loosely tied to data using partial searchable snapshots (as oppposed to full
searchable snapshots in the cold phase).

Relates to #60848
2021-02-05 14:38:13 -07:00
Andras Palinkas a3dbdae2ef
SQL: Test and fix the NULL handling of the String functions (#68379)
Fixed the inconsistencies regarding NULL argument handling.
NULL literal vs NULL field value as function arguments in some case
resulted in different function return values.

Functions should return with the same value no matter if the argument(s)
came from a field or from a literal.

The introduced integration test tests if function calls with same
argument values (regardless of literal/field) will return with the
same output (also checks if newly added functions are added to the
testcases).

Fixed the following functions:
* Insert: NULL start, length and replacement arguments (as fields) also
result in NULL return value instead of returning the input.
* Locate: NULL pattern results in NULL return value, NULL optional start
argument handled the same as missing start argument
* Replace: NULL pattern and replacement results in NULL instead of
returning the input
* Substring: NULL start or length results in NULL instead of returning
the input

Fixes #58907
2021-02-05 12:30:37 -05:00
James Rodewig 5695a63f0c
[DOCS] Minor layout and syntax fixes (#68589) 2021-02-05 12:06:04 -05:00
James Rodewig 36d4c12b92
[DOCS] Update ILM screenshots and tutorial (#68482)
Changes:

- Reworks the ILM tutorial to focus on the Elastic Agent and a built-in ILM policy
- Updates several screenshots in the docs for the new ILM UI

Co-authored-by: debadair <debadair@elastic.co>
2021-02-05 08:57:37 -05:00
Yannick Welsch 50f4a0b77c
Add partial searchable snapshot support for a frozen tier (#68509)
A frozen tier is backed by an external object store (like S3) and caches only a
small portion of data on local disks. In this way, users can reduce hardware
costs substantially for infrequently accessed data. For the frozen tier we only
pull in the parts of the files that are actually needed to run a given search.
Further, we don't require the node to have enough space to host all the files.
We therefore have a cache that manages which file parts are available, and which
ones not. This node-level shared cache is bounded in size (typically in relation
to the disk size), and will evict items based on a LFU policy, as we expect some
parts of the Lucene files to be used more frequently than other parts. The level
of granularity for evictions is at the level of regions of a file, and does not
require evicting full files. The on-disk representation that was chosen for the
cold tier is not a good fit here, as it won't allow evicting parts of a file.
Instead we are using fixed-size pre-allocated files and have implemented our own
memory management logic to map regions of the shard's original Lucene files onto
regions in these node-level shared files that are representing the on-disk
cache.

This PR adds the core functionality to searchable snapshots to power such a
frozen tier:
- It adds the node-level shared cache that evicts file regions based on a LFU
  policy
- It adds the machinery to dynamically download file regions into this cache and
  serve their contents when searches execute.
- It extends the mount API with a new parameter, `storage`, which selects the
  kind of local storage used to accelerate searches of the mounted index. If set
  to `full_copy` (default, used for cold tier), each node holding a shard of the
  searchable snapshot index makes a full copy of the shard to its local storage.
  If set to `shared_cache`, the shard uses the newly introduced shared cache,
  only holding a partial copy of the index on disk (used for frozen tier).

Co-authored-by: Tanguy Leroux <tlrx.dev@gmail.com>
Co-authored-by: Armin Braun <me@obrown.io>
Co-authored-by: David Turner <david.turner@elastic.co>
2021-02-05 09:15:07 +01:00
debadair 2c726cb981
[DOCS] Removed license level information. (#68568) 2021-02-04 18:04:09 -08:00
debadair ba45251833
[DOCS] Update package description. (#68565)
* [DOCS] Update package description.

* Fixed xref
2021-02-04 16:47:12 -08:00
James Rodewig bc0d37dffa
[DOCS] Document what makes a geo-point malformed (#59045) (#68556)
Co-authored-by: Ben Moskovitz <ben@mosk.nz>
2021-02-04 17:01:59 -05:00
James Rodewig ab0f4d51b2
[DOCS] Add missing newline for bulleted list in top_metrics docs (#68481) (#68550)
Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-02-04 14:49:02 -05:00
James Rodewig 6378c57ca0
[DOCS] EQL: Add `filter_path` param to EQL search API docs (#68537) 2021-02-04 13:39:01 -05:00
James Rodewig 1b2fad47c4
[DOCS] Fix rollup V2 security docs (#68518) 2021-02-04 12:37:41 -05:00
Jason Tedor 6e94e67ae9
Set recovery rate for dedicated cold nodes (#68480)
This commit sets the recovery rate for dedicated cold nodes. The goal is
here is enhance performance of recovery in a dedicated cold tier, where
we expect such nodes to be predominantly using searchable snapshots to
back the indices located on them. This commit follows a simple approach
where we increase the recovery rate as a function of the node size, for
nodes that appear to be dedicated cold nodes.
2021-02-04 10:36:07 -05:00
James Rodewig 9e7a27e085
[DOCS] Fix heading in disk usage tuning guide (#68519) 2021-02-04 08:52:12 -05:00
debadair 73e711064a
[DOCS] Updating migration guide heading. (#68500)
* [DOCS] Updating migration guide heading.

* Fixed anchor

* Fixed anchor
2021-02-03 16:14:42 -08:00
Pius 399e11b7e7
[DOCS] Add force merge disclaimer to tuning guide (#68491)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-02-03 16:42:01 -05:00
James Rodewig a5feaf978d
[DOCS] Add security privileges to search API docs (#68009) 2021-02-03 16:30:51 -05:00
Adam Locke 5d72d46ceb
[DOCS] Updating ILM phase language (#68477) 2021-02-03 14:52:38 -05:00
Igor Motov 9e3384ebc9
Add multi_terms aggs (#67597)
Adds a multi_terms aggregation support. The multi terms aggregation works
very similarly to the terms aggregation but supports multiple terms. The goal
of this PR is to add the basic functionality so it is not optimized at the
moment. It will be done in follow up PRs.

Closes #65623
2021-02-03 13:13:33 -05:00
James Rodewig 5476d8a6e0
[DOCS] Document cat allocation API response properties (#65635) 2021-02-03 12:58:35 -05:00
James Rodewig d5d8be9bff [DOCS] Fix typo 2021-02-03 10:45:16 -05:00
Joe Gallo 4d18334442
Add max_single_primary_size as a condition for the rollover index API (#67842) 2021-02-03 10:39:06 -05:00
James Rodewig 8b5154883e
[DOCS] Add link to Elastic data stream naming scheme blog (#68449) 2021-02-03 09:36:02 -05:00
Tianlun Li b0d185bb0d
Remove deprecated gateway settings (#53845)
This commit removes the following deprecated settings in v8:

- `gateway.expected_nodes`
- `gateway.expected_master_nodes`
- `gateway.recover_after_nodes`
- `gateway.recover_after_master_nodes`

Co-authored-by: ShawnLi1014 <shawnli1014@gmail.com>
2021-02-03 14:10:45 +00:00
James Rodewig 87105cb04a
[DOCS] Fix typo (#68446) 2021-02-03 09:02:48 -05:00
bellengao 6888371eee
[DOCS] Format the Get component template API doc (#68259)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-02-03 08:37:24 -05:00
Mark Vieira a92a647b9f Update sources with new SSPL+Elastic-2.0 license headers
As per the new licensing change for Elasticsearch and Kibana this commit
moves existing Apache 2.0 licensed source code to the new dual license
SSPL+Elastic license 2.0. In addition, existing x-pack code now uses
the new version 2.0 of the Elastic license. Full changes include:

 - Updating LICENSE and NOTICE files throughout the code base, as well
   as those packaged in our published artifacts
 - Update IDE integration to now use the new license header on newly
   created source files
 - Remove references to the "OSS" distribution from our documentation
 - Update build time verification checks to no longer allow Apache 2.0
   license header in Elasticsearch source code
 - Replace all existing Apache 2.0 license headers for non-xpack code
   with updated header (vendored code with Apache 2.0 headers obviously
   remains the same).
 - Replace all Elastic license 1.0 headers with new 2.0 header in xpack.
2021-02-02 16:10:53 -08:00
Adam Locke 5de8613c62
[DOCS] Add links to ESS for setting up remote clusters on cloud. (#68401) 2021-02-02 14:32:54 -05:00
Philippus Baalman c011181eec
[DOCS] Fix typo (#68364) 2021-02-02 09:59:57 -05:00
James Rodewig 0b4b59c784
[DOCS] Fix typo (#68362) (#68380)
Co-authored-by: Jaskaran Bindra <jskrnbindra@gmail.com>
2021-02-02 09:45:30 -05:00
James Rodewig b49576fabf
[DOCS] Add security privileges to snapshot/restore API docs (#67955) 2021-02-02 09:34:35 -05:00
István Zoltán Szabó e45d7a942d
[DOCS] Expands feature processors property description and adds a link of conceptual docs (#68213) 2021-02-02 14:48:43 +01:00
James Rodewig 3a6c837cff
[DOCS] Add Elastic data stream naming scheme docs (#68310) 2021-02-02 08:36:37 -05:00
James Rodewig 4a2a97a058
[DOCS] Document the `stack.templates.enabled` setting (#68328) 2021-02-02 08:35:21 -05:00
David Roberts 6e392a317d
Add processor architectures to cluster stats (#68264)
This change adds a new "architectures" section to the
cluster stats, containing a summary of how many nodes
in the cluster are on each processor architecture.

The intention is to make it easier to see whether
clusters are running on aarch64, or mixed x86_64/aarch64,
which may aid support as aarch64 becomes more commonly
used.
2021-02-02 09:48:20 +00:00
Hendrik Muhs cf08c0e6ab
[Transform] refactor cat transform to show more useful information (#68232)
Refactoring of cat transform to show more relevant information. The current cat transform shows a
lot of configuration details, however cat should show operationally useful information. This PR
changes the defaults and also adds when transform did a search last.
2021-02-02 07:29:20 +01:00
David Turner 4c8b75d208
Document taking snapshots of searchable snapshots (#68136)
Taking a snapshot of a cluster containing searchable snapshot indices is
kind of mindbending. This commit adds docs to indicate that this does
work.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-02-01 18:15:34 +00:00
Adam Locke c7855c2657
[DOCS] Minor rewording for HTTP settings (#68295)
* [DOCS] Minor rewording for HTTP settings.

* Revert "[DOCS] Minor rewording for HTTP settings."

This reverts commit 9a831adca6.

* Adds advanced wording to HTTP & transport settings.
2021-02-01 12:41:42 -05:00
James Rodewig ebf08c0c83
[DOCS] Reuse built-in index templates admon (#68314) 2021-02-01 12:34:21 -05:00
James Rodewig 97f1d13bdf
[DOCS] Reuse timestamp reqs (#68299)
Removes some duplication and reuses information about data stream
timestamp requirements using a tagged region.
2021-02-01 09:44:54 -05:00
James Rodewig 4625a18540
[DOCS] Fix minor suggester doc errors (#68244) 2021-02-01 09:33:12 -05:00
James Rodewig 7f3a4525a4
[DOCS] Remove outdated deprecated notes (#68246) 2021-02-01 09:30:45 -05:00
James Rodewig d31c8433e4
[DOCS] Fix typo (#68193) (#68287)
Changed PGP Keys to GPG Keys

Co-authored-by: Sriraag Sridhar <53432553+sriraagworks@users.noreply.github.com>
2021-02-01 09:28:39 -05:00
David Turner 2adeb4a666
Expand and consolidate networking docs (#68051)
Today's network config docs are split into "Network", "HTTP" and
"Transport" pages, with unclear relationships between them. We often
encounter users with weird configs that indicate they don't really
understand how these settings all relate. In fact these pages are all
very interrelated, and the HTTP and Transport pages are almost all only
for advanced users. This commit brings these docs into a single page and
rewords some things to try and guide users away from the advanced
settings unless their configuration needs all the extra complexity.

It also adds a section entitled "Binding and publishing" which clarifies
the meanings of the `bind_host` and `publish_host` parameters. This is
also a common source of confusion amongst users.

It also clarifies that many of these settings accept a list of
addresses, and warns that this may not be what you want. Closes #67956.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-02-01 13:06:20 +00:00
Valeriy Khakhutskyy 78368428b3
[ML] Add early stopping DFA configuration parameter (#68099)
The PR adds early_stopping_enabled optional data frame analysis configuration parameter. The enhancement was already described in elastic/ml-cpp#1676 and so I mark it here as non-issue.
2021-02-01 11:41:28 +01:00
James Rodewig 330e537fac
[DOCS] Fix SLM security privilege wording (#68238) 2021-01-29 16:48:14 -05:00
bellengao d69c03359f
Support max_single_primary_size in Resize Action and exposed in ILM (#67705) 2021-01-29 15:29:45 -05:00
James Rodewig ab3f8f5067
[DOCS] EQL: Add case-insensitive `~` operator (#68217)
Documents the case-insensitive `~` operator for `in` and string functions.

Relates to #67869 and #68176
2021-01-29 13:50:57 -05:00
James Rodewig 28ac8c9443
[DOCS] Clarify ILM rollup docs (#68223) 2021-01-29 12:17:37 -05:00
Marios Trivyzas bbf3cbfcfa
QL: Implement support for date_nanos ES type. (#67666)
Use an internal new DataType DATETIME_NANOS which is not exposed
and therefore cannot be used for CASTing. DATETIME is used instead
and the precision of both DATETIME and TIME has been promoted from
3 to 9, providing transparency to all datetime functionality regardless
of millis or nanos precision.

Moreover, CURRENT_TIMESTAMP/CURRENT_TIME can now return precision up
to 6 fractional digits of a second with the use of Clock.

Closes: #38562

Co-authored-by: Bogdan Pintea <bogdan.pintea@elastic.co>
2021-01-29 11:07:29 +01:00
Tal Levy 5811deb580
Add Rollup ILM Action (#65633)
this commit introduces a new Rollup ILM Action that allows indices
to be rolled up according to a specific rollup config. The
action also allows for the new rolled up index to be associated with
a different policy than the original/source index.

Relates #42720.

Closes #48003.
2021-01-28 17:48:09 -08:00
Howard af9e5aa652
[DOCS] Fix typo (#68129) 2021-01-28 17:07:01 -05:00
James Rodewig 44943e592a
[DOCS] Fix typo (#68085) (#68158)
Co-authored-by: Mykola Shestopal <nick4eva@users.noreply.github.com>
2021-01-28 16:46:10 -05:00
Lee Hinman ac1433d300
Add index creation version stats to cluster stats (#68141)
This commit adds statistics about the index creation versions to the `/_cluster/stats` endpoint. The
stats look like:

```
{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "indices" : {
    "count" : 3,
    ...
    "versions" : [
      {
        "version" : "8.0.0",
        "index_count" : 1,
        "primary_shard_count" : 2,
        "total_primary_size" : "8.6kb",
        "total_primary_bytes" : 8831
      },
      {
        "version" : "7.11.0",
        "index_count" : 1,
        "primary_shard_count" : 1,
        "total_primary_size" : "4.6kb",
        "total_primary_bytes" : 4230
      }
    ]
  },
  ...
}
```

(`total_primary_size` is only shown with the `?human` flag)

This is useful for telemetry as it allows us to see if/when a cluster has indices created on a
previous version that would need to be either upgraded or supported during an upgrade.
2021-01-28 13:58:21 -07:00
Jay Modi 70d304028a
Logstash Pipeline REST api spec and documentation (#67788)
This commit adds REST api specifications for the Logstash Pipeline APIs
and documentation of the APIs.

Closes #67360
2021-01-28 10:50:16 -07:00
James Rodewig fa8a49b8a7 [DOCS] Fix rollup API prereq wording 2021-01-28 11:12:55 -05:00
James Rodewig 63ad862f2a
[DOCS] Add xrefs to rollup overview (#68119) 2021-01-28 10:37:30 -05:00
James Rodewig 5b3b9060bc
[DOCS] Fix title abbrevs for API docs (#68118) 2021-01-28 10:28:41 -05:00
James Rodewig 81c3cba8a8
[DOCS] Add security privileges to index API docs (#68071) 2021-01-28 08:53:10 -05:00
Christoph Büscher b85d52adbd Skip reference/rest-api/usage/line_39 docs test 2021-01-28 13:00:26 +01:00
Adam Locke c91a808732
[DOCS] Update Painless examples to use seat data (#68029)
* Adds datetime as a date, which is necessary in setup.

* Updating field context example.

* Fixing sample data, updating context example, and updating runtime example.

* Updating field context and changing runtime field to use seats data.

* Update filter context to use the seats data.

* Updating min-should-match context to use seats data.

* Replacing last mentions of TEST[skip].

* Update usage with watcher response for build error.

* Updating usage API again for watcher.

* Third time's a charm for fixing test cases.

* Adding specific test replacement for watcher logging total.

* Change actors to keyword based on review feedback.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-01-27 16:42:22 -05:00
James Rodewig c4ab89f3f7
[DOCS] EQL: Add security privileges to EQL search docs (#68017) 2021-01-27 16:25:05 -05:00
David Turner 9c100cdeae
Extend default probe connect/handshake timeouts (#68059)
Today the discovery phase has a short 1-second timeout for handshaking
with a remote node after connecting, which allows it to quickly move on
and retry in the case of connecting to something that doesn't respond
straight away (e.g. it isn't an Elasticsearch node).

This short timeout was necessary when the component was first developed
because each connection attempt would block a thread. Since #42636 the
connection attempt is now nonblocking so we can apply a more relaxed
timeout.

If transport security is enabled then our handshake timeout applies to
the TLS handshake followed by the Elasticsearch handshake. If the TLS
handshake alone takes over a second then the whole handshake times out
with a `ConnectTransportException`, but this does not tell us which of
the two individual handshakes took so long.

TLS handshakes have their own 10-second timeout, which if reached yields
a `SslHandshakeTimeoutException` that allows us to distinguish a problem
at the TLS level from one at the Elasticsearch level. Therefore this
commit extends the discovery probe timeouts.
2021-01-27 16:41:44 +00:00
James Rodewig 03334b9801
[DOCS] Add security privileges to API docs (#67939) 2021-01-27 09:06:06 -05:00
debadair af87716c50
[DOCS] Added appendix to show dependencies (#67962) 2021-01-26 16:16:05 -08:00
James Rodewig bde13769c4 [DOCS] Reword rollup API reqs 2021-01-26 16:04:33 -05:00