Commit Graph

618 Commits

Author SHA1 Message Date
James Rodewig 97bdb9ba75 [DOCS] Minor data stream docs fixes 2020-10-24 19:49:30 -04:00
James Rodewig 159d2a33ee
[DOCS] Fix `ignore_unavailable` param in get index and get alias APIs (#64075) 2020-10-22 15:10:37 -04:00
Gordon Brown 91f4b58bf7
Deprecate REST access to System Indices (#60945)
This PR adds deprecation warnings when accessing System Indices via the REST layer. At this time, these warnings are only enabled for Snapshot builds by default, to allow projects external to Elasticsearch additional time to adjust their access patterns.

Deprecation warnings will be triggered by all REST requests which access registered System Indices, except for purpose-specific APIs which access System Indices as an implementation detail a few specific APIs which will continue to allow access to system indices by default:

- `GET _cluster/health`
- `GET {index}/_recovery`
- `GET _cluster/allocation/explain`
- `GET _cluster/state`
- `POST _cluster/reroute`
- `GET {index}/_stats`
- `GET {index}/_segments`
- `GET {index}/_shard_stores`
- `GET _cat/[indices,aliases,health,recovery,shards,segments]`

Deprecation warnings for accessing system indices take the form:
```
this request accesses system indices: [.some_system_index], but in a future major version, direct access to system indices will be prevented by default
```
2020-10-06 11:13:48 -06:00
Martijn van Groningen e0caf3f72e
Unmute rollover docs test (#62603)
The underlying issue was fixed a while ago in Lucene:
https://issues.apache.org/jira/browse/LUCENE-9517

and went away when lucene snapshot version was upgraded.

Also the name of the index to rollover had to be slightly changed,
so that it doesn't collide with data stream template's namespace.
(a regular index can't be created in the namespace that is managed
by a template that creates data streams)

Closes #62043
2020-09-18 10:51:44 +02:00
Lee Hinman d21ddb57a3
Add "synthetics-*-*" templates for synthetics fleet data (#62193)
* Add "synthetics-*-*" templates for synthetics fleet data

For the Elastic Agent we currently have `logs` and `metrics`, however, synthetic data doesn't belong
with those and thus we should have a place for it to live. This would be data reported from
heartbeat and under the 'monitoring' category.

This commit adds a composable index template for `synthetics-*-*` indices similar to the work in
 #56709 and #57629.

Resolves #61665
2020-09-14 16:37:21 -06:00
James Rodewig 3ccbebe199
[DOCS] Fix capitalization for several headings (#62324) 2020-09-14 12:18:32 -04:00
James Rodewig 95b8a4feaf
[DOCS] Split delete index template API docs (#62074) (#62168)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Zaeem <zaeemarshad@users.noreply.github.com>
2020-09-09 10:13:13 -04:00
David Kyle 610a4f12ba
Mute Docs rollover index test snippet (#62045)
For #62043
2020-09-07 11:21:52 +01:00
Julie Tibshirani 5065dbc41c
Remove a redundant section on field data types. (#61821)
All information in the section is already included in the 'mapping-types' page.
2020-09-02 15:00:01 -07:00
James Rodewig a405002b39
[DOCS] Update admon for built-in templates (#61549) (#61559) 2020-08-26 08:10:49 -04:00
James Rodewig cd6304ae6b
[DOCS] Add admon for built-in index templates (#61063)
Adds an important admonition for the built-in `metrics-*-*` and `logs-*-*` index
templates.

Updates several put index template snippets to include a priority.
2020-08-17 11:37:08 -04:00
James Rodewig a94e5cb7c4
[DOCS] Replace Wikipedia links with attribute (#61171) 2020-08-17 09:44:24 -04:00
James Rodewig ff14fb9b6f
[DOCS] Change wildcard to index pattern in DS docs (#61058) 2020-08-12 14:55:56 -04:00
James Rodewig ebfeb471cd
[DOCS] Update example data stream names (#60783)
Uses `my-data-stream` in place of `logs` for data stream examples.
This provides a more intuitive experience for users that copy/paste
their own values into snippets.
2020-08-06 08:37:44 -04:00
James Rodewig a4dc336c16
[DOCS] Replace `twitter` dataset in search/agg docs (#60667) 2020-08-04 13:31:52 -04:00
Russ Cam 24c72d4e71
[DOCS] Fix list dangling indices documentation (#60099)
This commit fixes the list dangling indices response.
The dangling_indices array is an array of objects
that represent aggregated dangling index information
2020-08-04 10:29:44 +10:00
James Rodewig ae01606785
[DOCS] Replace `twitter` dataset in docs (#60604) 2020-08-03 12:49:56 -04:00
James Rodewig 88172212bb
[DOCS] Note refresh requests are synchronous (#60540) 2020-07-31 16:07:19 -04:00
James Rodewig 724f706f89
[DOCS] Replace `twitter` dataset in docs APIs (#60521) 2020-07-31 11:52:26 -04:00
James Rodewig 3728ae6811
[DOCS] Replace `twitter` dataset in index API docs (#60473) 2020-07-31 09:09:54 -04:00
James Rodewig 4ebf0cddc0
[DOCS] Fix `template` param in put index template API (#60474) 2020-07-30 14:54:22 -04:00
James Rodewig eca1a1e659
[DOCS] Add `number_of_routing_shards` index setting to index modules (#60311)
Changes:

* Adds the `number_of_routing_shards` index setting to index modules docs.
* Updates the split API docs to mention that `number_of_routing_shards`
is a static setting.
2020-07-29 10:34:37 -04:00
James Rodewig 441c3a21b1
[DOCS] Update my-index examples (#60132)
Changes the following example index names to `my-index-000001` for consistency:

* `my-index`
* `my_index`
* `myindex`
2020-07-27 14:46:39 -04:00
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
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
debadair a3b851e9b9
[DOCS] Move snapshot-restore out of modules. (#49618)
* [DOCS] Move snapshot-restore docs out of modules.

* [DOCS] Incorporates comments from @jrodewig.

* [DOCS] Fix snippet tests
2020-01-09 16:12:02 -08:00
Matt Braymer-Hayes 5d289e32d9 Fix typo in refresh API docs (#50759) 2020-01-09 13:35:05 -06:00
Christoph Büscher 84af7c4844
Remove _reload_search_analyzer experimental status (#50696)
Removing the experimental status in the docs and the rest specs.
2020-01-08 10:34:41 +01:00
Lee Hinman 5adbf67c08
Add ILM histore store index (#50287)
* Add ILM histore store index

This commit adds an ILM history store that tracks the lifecycle
execution state as an index progresses through its ILM policy. ILM
history documents store output similar to what the ILM explain API
returns.

An example document with ALL fields (not all documents will have all
fields) would look like:

```json
{
  "@timestamp": 1203012389,
  "policy": "my-ilm-policy",
  "index": "index-2019.1.1-000023",
  "index_age":123120,
  "success": true,
  "state": {
    "phase": "warm",
    "action": "allocate",
    "step": "ERROR",
    "failed_step": "update-settings",
    "is_auto-retryable_error": true,
    "creation_date": 12389012039,
    "phase_time": 12908389120,
    "action_time": 1283901209,
    "step_time": 123904107140,
    "phase_definition": "{\"policy\":\"ilm-history-ilm-policy\",\"phase_definition\":{\"min_age\":\"0ms\",\"actions\":{\"rollover\":{\"max_size\":\"50gb\",\"max_age\":\"30d\"}}},\"version\":1,\"modified_date_in_millis\":1576517253463}",
    "step_info": "{... etc step info here as json ...}"
  },
  "error_details": "java.lang.RuntimeException: etc\n\tcaused by:etc etc etc full stacktrace"
}
```

These documents go into the `ilm-history-1-00000N` index to provide an
audit trail of the operations ILM has performed.

This history storage is enabled by default but can be disabled by setting
`index.lifecycle.history_index_enabled` to `false.`

Resolves #49180
2019-12-18 16:09:59 -07:00
James Rodewig a762c29dcf
[DOCS] Clarify frozen indices are read-only (#50318)
The freeze index API docs state that frozen indices are blocked for
write operations.

While this implies frozen indices are read-only, it does not explicitly
use the term "read-only", which is found in other docs, such as the
force merge docs.

This adds the "ready-only" term to the freeze index API docs as well
as other clarification.
2019-12-18 12:17:41 -05:00
James Rodewig e520b85675
[DOCS] Skip synced flush docs tests (#49986)
The current snippets in the synced flush docs can cause conflicts with
other background syncs, such as the global checkpoint sync or retention
lease sync, in the docs tests.

This skips tests for those snippets to avoid conflicts.
2019-12-09 13:16:16 -05:00
Tugberk Ugurlu ac07248402 [Docs] Fix typo in templates.asciidoc (#49726) 2019-11-29 18:43:45 +01:00
bellengao 00cef95a77 [DOCS] Correct the request path for flush API docs (#49615) 2019-11-27 09:26:57 -05:00
Yannick Welsch a5f23758a1 [DOCS] Correct request path for synced flush API docs (#49631)
Fixes an incorrect request path added with #46634
2019-11-27 08:43:21 -05:00
Julie Tibshirani 33a7f066e1
Remove include_type_name from the REST API spec and docs. (#48828)
In #48632 we removed support for `include_type_name` in the REST API. This PR
removes it from the API spec and documentation.
2019-11-12 09:42:46 -08:00
bellengao 13aef72f1c [DOCS] Correct typo in split index API docs (#48894) 2019-11-07 15:26:55 -05:00
James Rodewig ae80c890d6
[DOCS] Expand put mapping API docs examples (#47462) 2019-10-17 09:30:46 -04:00
James Rodewig 8e79bf6b2b
[DOCS] Reformat reload search analyzers API docs (#47824) 2019-10-11 08:29:05 -04:00
Alan Woodward 566e1b7d33
Remove type field from DocWriteRequest and associated Response objects (#47671)
This commit removes the type field from index, update and delete requests, and their
associated responses.

Relates to #41059
2019-10-11 10:23:55 +01:00
Florian Kelbert 1092b39334 [DOCS] Correct split API request format (#47774) 2019-10-09 08:28:23 -04:00
James Rodewig 29c6da75db
[DOCS] Fix errors in rollover index API docs (#47702) 2019-10-08 08:34:39 -04:00
James Rodewig 61ff51a233
[DOCS] Reformat clear cache API docs (#46512)
* [DOCS] Reformat clear cache API docs

* iter
2019-10-07 09:14:49 -04:00
James Rodewig fbf698ec02
[DOCS] Reformat refresh API docs (#46667) 2019-10-04 12:16:10 -04:00
James Rodewig 7ad45f406e
[DOCS] Reformat shrink index API docs (#46711) 2019-10-04 12:07:46 -04:00
James Rodewig 854cd91436 [DOCS] Correct headings for split index API docs 2019-10-04 11:02:50 -04:00
James Rodewig 506329f97d
[DOCS] Reformat split index API docs (#46713) 2019-10-04 10:26:38 -04:00
James Rodewig 730c35c4cd
[DOCS] Reformat index recovery API docs (#46493) 2019-10-03 16:13:21 -04:00
James Rodewig 0647050d1b
[DOCS] Reformat index shard stores API docs (#46504) 2019-10-03 15:57:11 -04:00
James Rodewig 7583c07fa8
[DOCS] Reorder index APIs alphabetically (#46981) 2019-10-01 15:13:27 -04:00
James Rodewig 45f8c970ef
[DOCS] Reformat flush API docs (#46875) 2019-09-27 11:42:55 -04:00
James Rodewig 48471b2e9a
[DOCS] Reformat clone index API docs (#46762) 2019-09-25 12:36:23 -04:00
Colin Goodheart-Smithe a574a66a21 Removes typed URLs from mapping APIs (#41676)
Relates to #41059
2019-09-23 18:20:07 +01:00
James Rodewig c8a905382a
[DOCS] Reformat rollover index API docs (#46778) 2019-09-23 09:18:01 -04:00
James Rodewig e8f32d4f4c
[DOCS] Update tagged region for index alias desc (#46886) 2019-09-19 15:23:52 -04:00
Armin Braun 49f11ad207
Fix snapshot_restore_exception in Docs Tests (#46852)
We should only snapshot the index we're going to
restore in the next step. Otherwise, we will
potentially not get the correct response or
fail restoring outright due to internal indices
getting created concurrently when running against
the x-pack distribution.

Closes #46844
2019-09-19 15:51:04 +02:00
James Rodewig 4ac134dc0f
[DOCS] Separate and reformat synced flush API docs (#46634) 2019-09-18 16:16:29 -04:00
James Rodewig 9ddd58892e
[DOCS] Reformat force merge API docs (#46685) 2019-09-18 10:10:16 -04:00
James Rodewig e355759086
[DOCS] Replace "// CONSOLE" comments with [source,console] (#46679) 2019-09-13 11:23:53 -04:00
James Rodewig df2bc9303a
[DOCS] Correct anchors and title for Update index settings API docs (#46707) 2019-09-13 09:45:32 -04:00
James Rodewig 5a82389c12
[DOCS] Remove cat request from Index Segments API requests (#46463) 2019-09-06 16:46:41 -04:00
James Rodewig e43be90e6c
[DOCS] [5 of 5] Change // TESTRESPONSE comments to [source,console-results] (#46449) 2019-09-06 14:05:36 -04:00
James Rodewig b63bb8c37b
[DOCS] Add index alias definition to glossary (#46339) 2019-09-06 11:35:27 -04:00
James Rodewig 97802d8aff
[DOCS] Change // CONSOLE comments to [source,console] (#46441) 2019-09-06 10:55:16 -04:00
James Rodewig 466c59a4a7
[DOCS] Replace "// TESTRESPONSE" magic comments with "[source,console-result] (#46295) 2019-09-05 16:47:18 -04:00
James Rodewig 565ba9cb88
[DOCS] Reformat index stats API docs (#46322) 2019-09-05 15:03:33 -04:00
James Rodewig b336fbe38a
[DOCS] Re-add versioning to put template docs (#46384)
Adds documentation for index template versioning
accidentally removed with #46297.
2019-09-05 10:18:15 -04:00
James Rodewig a5c60fb59a
[DOCS] Reformat index segments API docs (#46345) 2019-09-05 08:33:17 -04:00
James Rodewig bf0b3ce885
[DOCS] Reformat "put index template" API docs (#46297) 2019-09-04 11:47:32 -04:00
David Turner 4472773e0d
Docs for translog, history retention and flushing (#46245)
This commit updates the docs about translog retention and flushing to reflect
recent changes in how peer recoveries work. It also adds some docs to describe
how history is retained for replay using soft deletes and shard history
retention leases.

Relates #45473
2019-09-04 16:37:00 +01:00