Commit graph

462 commits

Author SHA1 Message Date
James Rodewig
c7ca1d5941 [DOCS] Make <target> defs consistent 2020-06-30 15:53:32 -04:00
James Rodewig
0edeb97206
[DOCS] Add data streams to get field mapping API docs (#58689)
Updates the existing get field mapping API docs to make them aware of
data streams. Relates to #58488.
2020-06-30 11:58:30 -04:00
Lee Hinman
3b68df2355
Add default composable templates for new indexing strategy (#57629)
This commit adds the component and composable templates, as well as ILM policies, for the new
default indexing strategy. It installs:

- logs-default-mappings (component)
- logs-default-settings (component)
- logs-default-policy (ilm policy)
- logs-default-template (composable template)
- metrics-default-mappings (component)
- metrics-default-settings (component)
- metrics-default-policy (ilm policy)
- metrics-default-template (composable template)

These templates and policies are managed by a new x-pack module, `stack`, and can be disabled by
setting `stack.templates.enabled` to `false`.

These ensure that patterns for the `logs-*-*` and `metrics-*-*` indices are set up to create data
streams with the proper mappings and settings.

This also makes changes to the `IndexTemplateRegistry` to support installing component and
composable templates (previously it supported only legacy templates).

Resolves #56709
2020-06-30 09:19:37 -06:00
Yannick Welsch
5e345e115b
Add index block api (#58094)
Adds an API for putting an index block in place, which also ensures for write blocks that, once successfully returning to
the user, all shards of the index are properly accounting for the block, for example that all in-flight writes to an index have
been completed after adding the write block.

This API allows coordinating more complex workflows, where it is crucial that an index is no longer receiving writes after
the API completes, useful for example when marking an index as read-only during an upgrade in order to reindex its
documents.
2020-06-30 09:33:15 +02:00
James Rodewig
926e9aff52
[DOCS] Document open requests for data streams (#58615)
Adds an open API example to the data streams docs. Also updates the
existing open API docs to make them aware of data streams.
2020-06-26 16:28:26 -04:00
James Rodewig
9f86ce6c0e
[DOCS] Remove composable index template refs (#58567)
Replaces `composable index template` and `composable template` with
`index template` throughout data stream-related docs.

`Composable index template` is only used to contrast with legacy index
templates.
2020-06-26 11:12:36 -04:00
Russ Cam
e54402526c
[DOCS] Update aliases to indicate array (#58469)
Updates the aliases documentation
to correct the parameter to an array.
2020-06-24 09:38:53 -04:00
Dan Hermann
484918ca70
[DOCS] Prohibit cloning, splitting, and shrinking a data stream's write index (#58105) 2020-06-22 07:14:21 -05:00
James Rodewig
f739b31fe1
[DOCS] Document get data stream API response body (#58344) 2020-06-18 16:18:32 -04:00
James Rodewig
1bc256078a
[DOCS] Prohibit deletion of a data stream's write index (#58341) 2020-06-18 15:46:25 -04:00
James Rodewig
865b7ac920
[DOCS] Reformat data stream API docs (#58322) 2020-06-18 10:46:01 -04:00
Yannick Welsch
b305454e23
Add new flag to check whether alias exists on remove (#58100)
This allows doing true CAS operations on aliases, making sure that an alias is actually properly
moved from a given source index onto a given target index. This is useful to ensure that an
alias is actually moved from a given index to another one, and not just added to another index.
2020-06-18 10:05:14 +02:00
James Rodewig
21e28bbdc8 [DOCS] Fix typo in create data stream API docs 2020-06-17 17:16:27 -04:00
James Rodewig
7c26d09d3c [DOCS] Fix typo in create data stream API docs 2020-06-17 17:14:02 -04:00
Dan Hermann
204bc0ea13
Document the prohibition on freezing data stream write indices (#58058) 2020-06-17 10:16:18 -05:00
Martijn van Groningen
eb6f46a342
Enforce valid field mapping exists for timestamp_field in templates. (#57741)
Relates to #53100
2020-06-12 13:22:20 +02:00
Martijn van Groningen
05b277552a
Add data stream support to the reindex api. (#57870)
This change now also copies the op_type from the reindex request's destination index request to the actual index request being used in the bulk request.

For ensuring no document exists, the op_type create doesn't need to be copied, since Versions.MATCH_DELETED will copied from the 'mainRequest.getDestination().version()'.
The `version()` method on IndexRequest only returns Versions.MATCH_DELETED if op_type=create and no specific version has been specified.

However in order to be able to index into a data stream, the op_type must be create. So in order to support that the op_type must be copied from the reindex request's destination index request to the actual index request being used in the bulk request.

Relates to #53100 and #57788
2020-06-11 08:38:57 +02:00
Dan Hermann
d69e201f35
Document that data stream write indices cannot be closed (#57770) 2020-06-09 07:42:41 -05:00
Dan Hermann
0fd92a3b0d
Move some docs about data streams from the create page to the intro page (#57841) 2020-06-09 06:45:25 -05:00
Dan Hermann
904bdae9ff
Change default backing index naming scheme (#57721) 2020-06-08 08:39:55 -05:00
debadair
181b1a2fbb
[DOCS] Fix chunking in template API docs (#57632)
* [DOCS] Fix chunking in template API docs

* Fixed typo in xref

* Added anchor for beats xref

* Fixed example
2020-06-03 17:14:20 -07:00
Lisa Cawley
8b9293b3bf
[DOCS] Replace docdir attribute with es-repo-dir (#57489) 2020-06-01 15:55:05 -07:00
Martijn van Groningen
f8b090b641
Ensure template exists when creating data stream (#56888)
Limit the creation of data streams only for namespaces that have a composable template with a data stream definition.

This way we ensure that mappings/settings have been specified and will be used at data stream creation and data stream rollover.

Also remove `timestamp_field` parameter from create data stream request and
let the create data stream api resolve the timestamp field
from the data stream definition snippet inside a composable template.

Relates to #53100
2020-05-28 13:11:15 +02:00
Lee Hinman
4dc32611fc
Rename template V2 classes to ComposableTemplate (#57183)
This PR changes the name of the Index Template V2 classes to "Composable Templates", it also ensures there are no mentions of "V2" in the documentation or error/warning messages. V1 templates are referred to as "legacy" templates.

Resolves #56609
2020-05-27 09:32:10 -06:00
James Rodewig
1cd172774f
[DOCS] Document index alias swaps are atomic (#55418)
Co-authored-by: Tugberk Ugurlu <tugberk@outlook.com>
2020-05-27 10:07:29 -04:00
Lee Hinman
d3ccada06f
Add template simulation API for simulating template composition (#56842)
This adds an API for simulating template composition with or without an index template.

It looks like:

```
POST /_index_template/_simulate/my-template
```

To simulate a template named `my-template` that already exists, or, to simulate a template that does
not already exist:

```
POST /_index_template/_simulate
{
  "index_patterns": ["my-index"]
  "composed_of": ["ct1", "ct2"],
}
```

This is related to #55686, which adds an API to simulate composition based on an index name (hence
the `_simulate_index` vs `_simulate`).

This commit also adds reference documentation for both simulation APIs.

Relates to #53101
Resolves #56390
Resolves #56255
2020-05-18 15:11:42 -06:00
Dan Hermann
a62483f7b5
Rename endpoint from plural "_data_streams" to singular "_data_stream" (#56762) 2020-05-15 08:23:43 -05:00
Lee Hinman
cad030d8d7
Don't allow invalid template combinations (#56397)
This commit removes the ability to put V2 index templates that reference missing component templates.
It also prevents removing component templates that are being referenced by an existing V2 index
template.

Relates to #53101
Resolves #56314
2020-05-14 15:33:35 -06:00
Dan Hermann
b769f762c0
Update rollover index API docs for data streams (#55551) 2020-05-14 07:12:55 -05:00
Julie Tibshirani
7c316e334d
Correct the type of the 'analyzer' parameter in the _analyze docs. (#56650)
This optional parameter can only be a string. To test out a transient custom
analysis chain, users are expected to use the 'tokenizer', 'filter', and
'char_filter' parameters.
2020-05-13 11:01:55 -07:00
Dan Hermann
8ea054b60a
Docs for data stream REST APIs (#55557) 2020-05-13 07:51:39 -05:00
debadair
2d0ca5205d
[DOCS] Clarify definition of max_size (#56561) 2020-05-12 14:41:18 -07:00
debadair
410b079de9
[DOCS] Added info about refresh interval & max_docs and step execution. Closes #49151. (#56315) 2020-05-11 14:46:44 -07:00
Lee Hinman
fc708ccca4
Remove prefer_v2_templates query string parameter (#56546)
This commit removes the `prefer_v2_templates` flag and setting. This was a brief setting that
allowed specifying whether V1 or V2 template should be used when an index is created. It has been
removed in favor of V2 templates always having priority.

Relates to #53101
Resolves #56528

This is not a breaking change because this flag was never in a released version.
2020-05-11 14:56:48 -06:00
Lee Hinman
cd6a89288f
Validate non-negative priorities for V2 index templates (#56139)
This also fixes an issue where a `null` priority was treated as below a 0 priority. `null` is now
treated as 0 priority when it comes to comparing V2 templates.

Relates to #53101
2020-05-04 14:46:08 -06:00
Henning Andersen
bd206446e0
[DOCS] Create index name required (#55886)
The name of the new index to create is required.

Relates #45749
2020-04-29 13:34:18 +02:00
Lee Hinman
fa22b10d4c
Initial documentation for index templates V2 (#55755)
This commit adds the initial document for version two index templates. Since these are intended to
be used in favor of V1 index templates, this re-uses the anchors for index templates to point to the
V2 APIs, renaming the V1 template docs' anchors (this was a suggestion from the docs team).

There is more documentation that can be written, but this is a start.

Relates to #53101
2020-04-28 15:58:40 -06:00
Yang Wang
92427d3758
Remove local parameter for get field mapping API (#55100)
The local parameter of get field mapping API is marked as deprecated in 7.x.
This PR removes it for v8.0
2020-04-15 12:02:10 +10:00
Yang Wang
6ce88038f2
Deprecate local parameter for get field mapping request (#55014)
The usage of local parameter for GetFieldMappingRequest has been removed from the underlying transport action since v2.0.

This PR deprecates the parameter from rest layer. It will be removed in next major version.
2020-04-12 12:34:44 +10:00
Luca Cavanna
0a93a93069
[DOCS] add docs for async search (#53675)
Relates to #49091

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2020-03-20 14:04:33 +01:00
James Rodewig
03caeaad79
[DOCS] Remove incorrect parms from put index template API docs (#53750)
Removes the `flat_settings` and `timeout` query parameters from the JSON
spec and asciidoc docs for the put index template API.

These parameters are not supported by the API.
2020-03-18 14:33:40 -04:00
Gordon Brown
351c2f9d40
Implement hidden aliases (#52547)
This commit introduces hidden aliases. These are similar to hidden
indices, in that they are not visible by default, unless explicitly
specified by name or by indicating that hidden indices/aliases are
desired.

The new alias property, `is_hidden` is implemented similarly to
`is_write_index`, except that it must be consistent across all indices
with a given alias - that is, all indices with a given alias must
specify the alias as either hidden, or all specify it as non-hidden,
either explicitly or by omitting the `is_hidden` property.
2020-03-03 16:30:22 -07:00
Marios Trivyzas
2eb986488a
[Docs] Clarify default value for allow_no_indices (#52635)
Add default value to each one of the usages of `allow_no_indices`
since it differs between different APIs.

Relates to: #52534
2020-02-24 11:37:29 +01:00
bellengao
cecee07cb1
[DOC] Remove definition typo in update alias API docs (#52184)
Removes an erroneously duplicated definition heading from the update alias API reference docs.
2020-02-14 08:30:26 -05:00
Nhat Nguyen
6e0fbbd4db
Remove translog retention settings (#51697)
The translog retention settings index.translog.retention.size and 
index.translog.retention.age were effectively ignored in 7.4, 
deprecated in 7.7, and now removed in 8.0 in favor of soft-deletes.

Closes #50775
2020-01-31 08:18:07 -05:00
Yannick Welsch
a57a9a31c3 Stricter checks of setup and teardown in docs tests (#51430)
Made checks stricter after backporting PR.
2020-01-28 17:53:57 +01:00
Yannick Welsch
e5dd459745
Avoid unnecessary setup and teardown in docs tests (#51430)
The docs tests have recently been running much slower than before (see #49753).

The gist here is that with ILM/SLM we do a lot of unnecessary setup / teardown work on each
test. Compounded with the slightly slower cluster state storage mechanism, this causes the
tests to run much slower.

In particular, on RAMDisk, docs:check is taking

ES 7.4: 6:55 minutes
ES master: 16:09 minutes
ES with this commit: 6:52 minutes

on SSD, docs:check is taking

ES 7.4: ??? minutes
ES master: 32:20 minutes
ES with this commit: 11:21 minutes
2020-01-28 09:52:24 +01:00
Gordon Brown
44f5ed6fd9
Deprecate creation of dot-prefixed index names except for hidden and system indices (#49959)
This commit deprecates the creation of dot-prefixed index names (e.g.
.watches) unless they are either 1) a hidden index, or 2) registered by
a plugin that extends SystemIndexPlugin. This is the first step
towards more thorough protections for system indices.

This commit also modifies several plugins which use dot-prefixed indices
to register indices they own as system indices, and adds a plugin to
register .tasks as a system index.
2020-01-27 17:18:26 -07:00
Nhat Nguyen
09b46c8646
Goodbye and thank you synced flush! (#50882)
Synced flush was a brilliant idea. It supports instant recoveries with a 
quite small implementation. However, with the presence of sequence
numbers and retention leases, it is no longer needed. This change
removes it from 8.0.

Relates #5077
2020-01-16 09:43:07 -05:00
Nhat Nguyen
08b8450b62 Deprecate synced flush (#50835)
A normal flush has the same effect as a synced flush on Elasticsearch
7.6 or later. It's deprecated in 7.6 and will be removed in 8.0.

Relates #50776
2020-01-13 19:54:23 -05:00