Commit Graph

495 Commits

Author SHA1 Message Date
debadair db0adfd2b8
[DOCS] Refactored index-templates topic. (#59737)
* [DOCS] Refactored index-templates topic.

* [DOCS] Add separate files.

* [DOCS] Add delete component template.

* Apply suggestions from code review

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

* [DOCS] Incorporated review comments
2020-07-23 19:02:11 -07:00
James Rodewig 98d21fe551
[DOCS] Fix shrink index API prereqs (#59985) 2020-07-22 13:10:10 -04:00
James Rodewig 80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
James Rodewig 79c45a9099
[DOCS] Mark data stream stats API as stable (#59978)
Removes experimental admon from data stream stats API.
Relates to #59860.
2020-07-21 11:05:34 -04:00
James Rodewig cb6d1c00f0
[DOCS] Document data stream stats API (#59435) 2020-07-20 09:33:01 -04:00
Dan Hermann 09407045fd
[DOCS] write_index_only option for put mapping (#59610) 2020-07-16 07:46:44 -05:00
Julie Tibshirani 0e15cc588d
Expand docs for component template merging. (#59466)
This change clarifies the order in which components are merged. It also adds
information on mapping merging, now that this has been implemented.
2020-07-14 11:07:26 -07:00
James Rodewig 0f145ace6f
[DOCS] Simplify index template snippets for data streams (#59533)
Removes the `@timestamp` field mapping from several data stream index
template snippets.

With #59317, the `@timestamp` field defaults to a `date` field data type
for data streams.
2020-07-14 12:08:54 -04:00
James Rodewig 1e8970985d
[DOCS] Add data streams to index template API docs (#59462) 2020-07-14 11:49:24 -04:00
Andrei Dan 5609353c5d
Default to @timestamp in composable template datastream definition (#59317)
This makes the data_stream timestamp field specification optional when
defining a composable template.
When there isn't one specified it will default to `@timestamp`.
2020-07-14 11:45:48 +01:00
James Rodewig 31702b7ff1
[DOCS] Add data streams to reload search analyzers API (#59422) 2020-07-13 12:33:43 -04:00
James Rodewig cd756147a9
[DOCS] Add data streams to index APIs (#59329) 2020-07-13 08:47:29 -04:00
Dan Hermann 9954bf14cd
[DOCS] Update get data stream API 2020-07-10 14:38:11 -05:00
James Rodewig 5e832f35f4
[DOCS] Add data streams to clear cache API docs (#59324) 2020-07-09 16:38:56 -04:00
James Rodewig 4718953469
[DOCS] Document index aliases do not support data streams (#59321) 2020-07-09 16:32:07 -04:00
James Rodewig b174655457
[DOCS] Add x-pack tag to data stream docs (#59241) 2020-07-09 08:45:13 -04:00
James Rodewig 30be215a82
[DOCS] Document `@timestamp` as only valid DS timestamp field (#59225) 2020-07-08 14:02:36 -04:00
James Rodewig 7bd93de06f
[DOCS] Update get data stream API response (#59197) (#59230)
Updates docs and snippets for changes made to the get data stream API with
PR #59128.
2020-07-08 11:02:30 -04:00
James Rodewig 678f9e3413
Revert "[DOCS] Update get data stream API response (#59197)" (#59227)
This reverts commit db3852898f.
2020-07-08 09:39:16 -04:00
James Rodewig db3852898f
[DOCS] Update get data stream API response (#59197)
Updates docs and snippets for changes made to the get data stream API with
PR #59128.
2020-07-08 08:40:49 -04:00
Martijn van Groningen cb6b05d12b
Fix the timestamp field of a data stream to @timestamp (#59076)
The commit makes the following changes:
* The timestamp field of a data stream definition in a composable
  index template can only be set to '@timestamp'.
* Removed custom data stream timestamp field validation and reuse the validation from `TimestampFieldMapper` and
  instead only check that the _timestamp field mapping has been defined on a backing index of a data stream.
* Moved code that injects _timestamp meta field mapping from `MetadataCreateIndexService#applyCreateIndexRequestWithV2Template58956(...)` method
  to `MetadataIndexTemplateService#collectMappings(...)` method.
* Fixed a bug (#58956) that cases timestamp field validation to be performed
  for each template and instead of the final mappings that is created.
* only apply _timestamp meta field if index is created as part of a data stream or data stream rollover,
this fixes a docs test, where a regular index creation matches (logs-*) with a template with a data stream definition.

Relates to #58642
Relates to #53100
Closes #58956
Closes #58583
2020-07-08 09:41:47 +02:00
James Rodewig 2be9db01c8
[DOCS] Replace `datatype` with `data type` (#58972) 2020-07-07 13:52:10 -04:00
James Rodewig e3e63e3f8a
[DOCS] Add data streams to shard stores API docs (#59070) 2020-07-07 13:21:51 -04:00
James Rodewig e33a7ed0cd
[DOCS] Add data streams to force merge API docs (#58951) 2020-07-07 13:08:19 -04:00
Grzegorz Banasiak bee43b9fd0
[DOCS] Clarify atomic change for alias swaps (#59154)
Small edit highlighting the fact that atomic cluster state change does not guarantee lack of errors for in-flight requests.

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2020-07-07 11:38:54 -04:00
Rory Hunter 3f51fedfe6
Dangling indices documentation (#58751)
Part of #48366. Add documentation for the dangling indices
API added in #58176.

Co-authored-by: David Turner <david.turner@elastic.co>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2020-07-03 16:28:32 +01:00
debadair 07fda012a3
[DOCS] Add simulate ref (#58579)
* [DOCS] Add simulate ref pages

* Add links & experimental tags

* Fixed simulate index response

* Apply suggestions from code review

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

*Incorporate review feedback.
2020-07-02 18:47:24 -07:00
Dan Hermann 1b63d2b5bb
Update docs for delete data stream API to show that multiple names are supported (#58838) 2020-07-02 16:12:50 -05:00
James Rodewig 6a92c0fea0
[DOCS] Add data streams to flush API docs (#58950) 2020-07-02 17:06:47 -04:00
James Rodewig 7538c93b11
[DOCS] Add data streams to put mapping and update settings API docs (#58849) 2020-07-02 09:11:04 -04:00
James Rodewig 7087a4546d
[DOCS] Fix snippet tests for resolve API docs (#58908) 2020-07-02 09:04:27 -04:00
Martijn van Groningen 001b3fb440
Add data stream timestamp validation via metadata field mapper (#58582)
This commit adds a new metadata field mapper that validates,
that a document has exactly a single timestamp value in the data stream timestamp field and
that the timestamp field mapping only has `type`, `meta` or `format` attributes configured.
Other attributes can affect the guarantee that an index with this meta field mapper has a 
useable timestamp field.

The MetadataCreateIndexService inserts a data stream timestamp field mapper whenever
a new backing index of a data stream is created.

Relates to #53100
2020-07-02 10:58:18 +02:00
Dan Hermann c7b41802c2
[DOCS] Resolve index API (#58206) 2020-07-01 08:52:18 -05:00
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