Commit graph

680 commits

Author SHA1 Message Date
Mary Gouseti
a432313ff3
Data stream lifecycle class names (#97381) 2023-07-05 12:28:32 +03:00
Simon Cooper
5d1f616c50
Fix format of DiscoveryNode xcontent index version fields (#97223)
Also changed the value to an int rather than a string to differentiate it from node version
2023-06-29 16:53:38 +01:00
Mary Gouseti
1abd51b167
Start with data stream lifecycle documentation (#95326) 2023-06-28 16:18:05 +03:00
Simon Cooper
3726113f06
Add IndexVersion to cluster state (#96258)
This adds IndexVersion to cluster state, alongside node version. This is needed so IndexVersion can be tracked across the cluster, allowing min/max supported index versions to be determined.
2023-06-27 10:52:00 +01:00
Mary Gouseti
c8e676aea8
Rebranding user facing DLM references (#96866)
Part of bigger rebranding effort (#96875)
2023-06-20 14:32:24 +03:00
John Verwolf
5002c5f334
Docs: Improve the Field Usage Stats API Documentation (#96333)
Adds descriptions of the values returned in the response body of the _field_usage_stats API.

Closes #88313
2023-06-01 09:56:47 -07:00
debadair
777598d602
[DOCS] Remove redirect pages (#88738)
* [DOCS] Remove manual redirects

* [DOCS] Removed refs to modules-discovery-hosts-providers

* [DOCS] Fixed broken internal refs

* Fixing bad cross links in ES book, and adding redirects.asciidoc[] back into docs/reference/index.asciidoc.

* Update docs/reference/search/point-in-time-api.asciidoc

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

* Update docs/reference/setup/restart-cluster.asciidoc

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

* Update docs/reference/sql/endpoints/translate.asciidoc

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

* Update docs/reference/snapshot-restore/restore-snapshot.asciidoc

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

* Update repository-azure.asciidoc

* Update node-tool.asciidoc

* Update repository-azure.asciidoc

---------

Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Amy Jonsson <amy.jonsson@elastic.co>
Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-05-24 12:32:46 +01:00
Martijn van Groningen
49e8ee4269
Remove remaining tsdb tech preview labels (#95563)
Remove tech preview label from a number of tsdb settings and mapping attributes.
2023-04-26 12:11:03 +02:00
Toby Sutor
ba9dc81115
[docs] Clarify that index template settings take precedence over comp… (#87374)
* [docs] Clarify that index template settings take precedence over component templates.

[docs] Clarify that index template settings take precedence over component templates.

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

Co-authored-by: Adam Locke <adam.locke@chronosphere.io>

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
Co-authored-by: Adam Locke <adam.locke@chronosphere.io>
2023-04-19 09:18:33 +02:00
Cauê Marcondes
91cd61a454
[Fleet] Support for Profiling symbolization (#95241)
* It adds the profiling index pattern profiling-* to the fleet server service privileges.
* And adds profiling-* to kibana system role privileges.

---------

Co-authored-by: Daniel Mitterdorfer <daniel.mitterdorfer@elastic.co>
2023-04-18 07:12:44 +02:00
Mary Gouseti
1af2f438a3
[DLM] Extend the simulate template API to support include defaults (#94861) 2023-04-04 11:25:35 +02:00
David Turner
e377a8601a
Simplify IndicesShardStoresAction (#94507)
- No need to use an `AsyncShardFetch` here, there is no caching
- Response may be very large, introduce chunking
- Fan-out may be very large, introduce throttling
- Processing time may be nontrivial, introduce cancellability
- Eliminate many unnecessary intermediate data structures
- Do shard-level response processing more eagerly
- Determine allocation from `RoutingTable` not `RoutingNodes`
- Add tests

Relates #81081
2023-03-27 11:34:07 -04:00
Mary Gouseti
fe20d923ae
[DLM] Introduce default rollover cluster setting & expose it via APIs (#94240)
For managing data streams with DLM we chose to have one cluster setting that will determine the rollover conditions for all data streams. This PR introduces this cluster setting, it exposes it via the 3 existing APIs under the flag `include_defaults` and adjusts DLM to use it. The feature remains behind a feature flag.
2023-03-07 16:41:32 +01:00
Steve Gordon
a7e65e3b2d
Fix get data stream documentation (#94009)
The documentation specifies the possible values for the status of the response. This endpoint is inconsistent with most others that expose the health status as it returns the values as uppercase strings rather than lowercase. 

This PR fixes the cases in the documentation to align with the actual values returned in the response body.
2023-02-22 13:46:04 +00:00
Nicolas Ruflin
9f4d7fafad
Add ignore_missing_component_templates config option (#92436)
This change introduces the configuration option `ignore_missing_component_templates` as discussed in https://github.com/elastic/elasticsearch/issues/92426 The implementation [option 6](https://github.com/elastic/elasticsearch/issues/92426#issuecomment-1372675683) was picked with a slight adjustment meaning no patterns are allowed.

## Implementation

During the creation of an index template, the list of component templates is checked if all component templates exist. This check is extended to skip any component templates which are listed under `ignore_missing_component_templates`. An index template that skips the check for the component template `logs-foo@custom` looks as following:


```
PUT _index_template/logs-foo
{
  "index_patterns": ["logs-foo-*"],
  "data_stream": { },
  "composed_of": ["logs-foo@package", "logs-foo@custom"],
  "ignore_missing_component_templates": ["logs-foo@custom"],
  "priority": 500
}
```

The component template `logs-foo@package` has to exist before creation. It can be created with:

```
PUT _component_template/logs-foo@custom
{
  "template": {
    "mappings": {
      "properties": {
        "host.ip": {
          "type": "ip"
        }
      }
    }
  }
}
```

## Testing

For manual testing, different scenarios can be tested. To simplify testing, the commands from `.http` file are added. Before each test run, a clean cluster is expected.

### New behaviour, missing component template

With the new config option, it must be possible to create an index template with a missing component templates without getting an error:

```
### Add logs-foo@package component template

PUT http://localhost:9200/
    _component_template/logs-foo@package
Authorization: Basic elastic password
Content-Type: application/json

{
  "template": {
    "mappings": {
      "properties": {
        "host.name": {
          "type": "keyword"
        }
      }
    }
  }
}

### Add logs-foo index template

PUT http://localhost:9200/
    _index_template/logs-foo
Authorization: Basic elastic password
Content-Type: application/json

{
  "index_patterns": ["logs-foo-*"],
  "data_stream": { },
  "composed_of": ["logs-foo@package", "logs-foo@custom"],
  "ignore_missing_component_templates": ["logs-foo@custom"],
  "priority": 500
}

### Create data stream

PUT http://localhost:9200/
    _data_stream/logs-foo-bar
Authorization: Basic elastic password
Content-Type: application/json

### Check if mappings exist

GET http://localhost:9200/
    logs-foo-bar
Authorization: Basic elastic password
Content-Type: application/json
```

It is checked if all templates could be created and data stream mappings are correct.

### Old behaviour, with all component templates

In the following, a component template is made optional but it already exists. It is checked, that it will show up in the mappings:

```
### Add logs-foo@package component template

PUT http://localhost:9200/
    _component_template/logs-foo@package
Authorization: Basic elastic password
Content-Type: application/json

{
  "template": {
    "mappings": {
      "properties": {
        "host.name": {
          "type": "keyword"
        }
      }
    }
  }
}

### Add logs-foo@custom component template

PUT http://localhost:9200/
    _component_template/logs-foo@custom
Authorization: Basic elastic password
Content-Type: application/json

{
  "template": {
    "mappings": {
      "properties": {
        "host.ip": {
          "type": "ip"
        }
      }
    }
  }
}

### Add logs-foo index template

PUT http://localhost:9200/
    _index_template/logs-foo
Authorization: Basic elastic password
Content-Type: application/json

{
  "index_patterns": ["logs-foo-*"],
  "data_stream": { },
  "composed_of": ["logs-foo@package", "logs-foo@custom"],
  "ignore_missing_component_templates": ["logs-foo@custom"],
  "priority": 500
}

### Create data stream

PUT http://localhost:9200/
    _data_stream/logs-foo-bar
Authorization: Basic elastic password
Content-Type: application/json

### Check if mappings exist

GET http://localhost:9200/
    logs-foo-bar
Authorization: Basic elastic password
Content-Type: application/json
```

### Check old behaviour

Ensure, that the old behaviour still exists when a component template is used that is not part of `ignore_missing_component_templates`: 

```
### Add logs-foo index template

PUT http://localhost:9200/
    _index_template/logs-foo
Authorization: Basic elastic password
Content-Type: application/json

{
  "index_patterns": ["logs-foo-*"],
  "data_stream": { },
  "composed_of": ["logs-foo@package", "logs-foo@custom"],
  "ignore_missing_component_templates": ["logs-foo@custom"],
  "priority": 500
}
```

Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
2023-01-31 08:40:29 -07:00
Ievgen Degtiarenko
abbc78dc0f
Add version to discovery node toXContent and toString (#93307) 2023-01-30 10:10:49 +01:00
David Kilfoyle
3f880613f8
[Docs] Remove tech preview notice from downsampling docs (#92913) 2023-01-19 09:05:59 -05:00
Abdon Pijpelink
64ce4d1189
[DOCS] Downsampling code snippet formatting (#92981) 2023-01-17 15:31:25 +01:00
Lee Hinman
f04c751997
Mark simulate index API non-experimental in documentation (#92331)
This has been stable for a long time, we just missed removing the experimental[] tag in the docs.
2022-12-13 11:34:32 -07:00
David Turner
671fe3faac
Clarify index recovery docs (#91861)
Mentions that we only report on recoveries for shard copies that
actually exist in the cluster, so you don't see all historical data if,
e.g., the shard copy relocates elsewhere.
2022-11-24 16:21:51 +00:00
Anthony McGlone
47e3b89176
[DOCS] Clarify multi-field addition requires update by query for existing documents (#91541)
* [DOCS] Clarify multi-field addition requires update by query for existing documents

* Update docs/reference/mapping/params/multi-fields.asciidoc

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

* Update docs/reference/indices/put-mapping.asciidoc

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

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-11-18 12:38:04 +01:00
David Kilfoyle
cad87c4d5a
[DOCS] Add Downsampling docs (#88571)
This adds documentation for downsampling of time series indices.
2022-10-12 12:10:16 -04:00
Julie Tibshirani
9f0f02d232
Make force merge warning more precise (#90151)
We tell users not to force merge unless their index is read-only. This PR
proposes to soften the warning and make it more precise. This way, more users
can consider force merging for their use case, like those with append-only
indices, or those with a small number of updates that can regularly perform a
force merge.
2022-09-26 12:07:13 -07:00
David Kilfoyle
2a44a8982f
[DOCS] Remove feature flag from TSDS docs (#89673)
* Docs: Remove feature flag and add preview label to TSDS docs

* Fix technical preview tag
2022-08-29 10:33:55 -04:00
Joe Gallo
3bde177fea
Rollover min_* conditions docs and highlight (#89434) 2022-08-17 15:24:18 -04:00
Julie Tibshirani
abd561a277
Support kNN vectors in disk usage action (#88785)
This change adds support for kNN vector fields to the `_disk_usage` API. The
strategy:
* Iterate the vector values (using the same strategy as for doc values) to
estimate the vector data size
* Run some random vector searches to estimate the vector index size 

Co-authored-by: Yannick Welsch <yannick@welsch.lu>

Closes #84801
2022-07-26 07:57:47 -07:00
David Kilfoyle
40e9f3097c
[DOCS] Add TSDS docs, take two (#87703)
* Revert "Revert "[DOCS] Add TSDS docs (#86905)" (#87702)"

This reverts commit 0c86d7b9b2.

* First fix to tests

* Add data_stream object to index template

* small rewording

* Add enable data stream object in gradle example setup

* Add bullet about data stream must be enabled in template
2022-06-16 12:44:10 -04:00
David Kilfoyle
0c86d7b9b2
Revert "[DOCS] Add TSDS docs (#86905)" (#87702)
Reverts elastic/elasticsearch#86905
2022-06-15 13:32:12 -04:00
David Kilfoyle
d57f4ac2c6
[DOCS] Add TSDS docs (#86905)
* [DOCS] Add TSDB docs

* Update docs/build.gradle

Co-authored-by: Adam Locke <adam.locke@elastic.co>

* Address Nik's comments, part 1

* Address Nik's comments, part deux

* Reword write index

* Add feature flags

* Wrap one more section in feature flag

* Small fixes

* set index.routing_path to optional

* Update storage reduction value

* Update create index template code example

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2022-06-15 12:22:07 -04:00
Ryan Ernst
dd686ebe6d
Fix expand_wildcards default in docs (#87086)
The get settings api has accepts the expand_wildcards option. The docs
state the default value is `all`, but it is actually now `open` (which
does not include hidden or closed indices by default). This commit
changes the docs to match the existing behavior.
2022-05-24 13:11:35 -07:00
Adam Locke
53b55a711b
Rectified the "Add lifecycle policy" hyperlink. (#86717) (#86735)
"Add" was out of the hyperlink context which I have fixed it.

Earlier line 71 was like : * *Add*  <<set-up-lifecycle-policy,*lifecycle policy*>>

After rectifying line 71 is like : * <<set-up-lifecycle-policy,*Add lifecycle policy*>>

(cherry picked from commit 3b8d51c696)

Co-authored-by: Tapomoy Bhowmik <99604828+TapomoyBhowmik@users.noreply.github.com>
2022-05-12 10:22:40 -04:00
Francisco Fernández Castaño
ce9819fa6c
Keep track of desired nodes cluster membership (#84165)
This commit adds tracking for desired nodes cluster membership.

When desired nodes are updated they are matched against the current
cluster members. Additionally when a node joins the cluster the
desired nodes cluster membership is updated.
2022-05-03 14:06:48 +02:00
William Brafford
03985f1953
Provide 'system' attribute when resolving system indices (#85042)
* Resolve indices api: add 'system' attribute
* Update docs/changelog/85042.yaml
* Remove magic strings for attribute values
* Update API docs to provide possible resolved index attributes
2022-03-22 11:40:42 -04:00
Dan Roscigno
37beabcb2e
reorder and merge data management and ILM doc pages (#84679)
* reorder and merge data management and ILM doc pages

* update abbreviated titles
2022-03-07 18:33:28 -05:00
Abele Mălan
9ecb96fcf3
Fix some typos in plugins & reference docs (#84667)
This pull request removes a few instances of duplicate words or
punctuation and erroneous spelling from the docs.
2022-03-07 12:29:58 -05:00
Joe Gallo
119fbcf64e
[DOCS] Fix shrink index API prereqs (#84197) 2022-02-21 16:17:49 -05:00
weizijun
79132ed57b
Add rollover add max_primary_shard_docs condition (#80981)
Add a new rollover condition with the name `max_primary_shard_docs`.
Triggers rollover when the largest primary shard in the index reaches a certain number of documents.
2022-02-08 14:04:04 +01:00
Dan Hermann
7987507014
[DOCS] 'features' flag added in #83083 (#83452) 2022-02-07 08:26:06 -06:00
Martijn van Groningen
e6326078a0
Simulate template api to include settings from IndexSettingProvider (#82609)
The simulate template api should include the settings that registered IndexSettingProvider generate.
Currently, these settings are not included in the simulate template api response,
but are only used to create a dummy IndexService instance to validate aliases.
2022-01-17 10:22:22 +01:00
James Rodewig
5354e50316
[DOCS] Fix anchor for 'Shrink an index' section (#81665)
Reverts an anchor change from #46711.

Previous versions of the docs use the `_shrinking_an_index` anchor for this
section. Preserving that anchor will prevent doc build breaks in future releases.
2021-12-13 12:24:31 -05:00
mushaoqiong
d467aae67e
Force merge rest api support wait_for_completion (#80463)
Force merge action is a very costly action. It may take several hours to run for big indices. But current force merge rest api do not support wait_for_completion parameter.
This adds support for the wait_for_completion parameter.
2021-12-13 10:32:03 +00:00
Martijn van Groningen
e20fe6d639
Add replicated field to get data stream api response. (#80988)
Internally we already kept track of whether a data stream is replicated by CCR.
It is part of the `DataStream` class. This just adds it to the xcontent serialization
of the get data stream api response class.

Relates to elastic/kibana#118899
2021-11-30 09:30:05 +01:00
James Rodewig
2a30dfe4d2
[DOCS] Fix type response values for index recovery API (#81000)
We updated the `type` response values in https://github.com/elastic/elasticsearch/pull/19516. This updates the docs with the correct values.

Closes https://github.com/elastic/elasticsearch/issues/80264

Co-authored-by: David Turner <david.turner@elastic.co>
2021-11-24 14:34:25 -05:00
Yannick Welsch
064936e790
Add field usage support for vectors (#80608)
Add field usage tracking support for the new vectors functionality.
2021-11-15 08:44:02 +01:00
Dan Hermann
0d21b032b6
[DOCS] Custom routing for data streams 2021-11-10 07:11:50 -06:00
James Rodewig
f56a0f4b66
[DOCS] Remove testenv annotations from doc snippet tests (#80023)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
2021-11-05 18:38:50 -04:00
Dan Hermann
4a36d5cd79
Remove endpoint for freezing indices (#78918) 2021-10-26 06:37:56 -05:00
Stef Nestor
338205eff6
Update question: index recovery (#78881)
* Update question: index recovery

Hello, team! I'm trying to understand possible recovery stages for myself per [this doc > `STAGE`](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html#index-recovery-api-response-body) as compared to [this code](https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryState.java#L41-L91) ([part2](https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/indices/recovery/RecoveryState.java#L187-L223)). However, I'm not finding the expected reference to `STAGE:start` & instead am finding reference to `STAGE:verify_index`. I may be missing a code-to-human translation somewhere. Will you double check for me? 🙏🏼

* Update verify_index description and change ordering

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-10-14 11:03:53 -04:00
David Turner
d2bb6ebb69
Get-templates APIs don't support lists (#78989)
We document that `GET /_index_template/...` accepts a comma-separated
list of template names but in fact today this API accepts only a single
name or pattern. Likewise `GET /_cat/templates/...` (at least it didn't
until #78829 but that's not released yet). This commit fixes the docs to
indicate these APIs accept only a single template name and also adds
some extra validation to reject requests containing a `,` since such a
request cannot match any actual templates.

It also adjusts `GET /_cat/templates` to use the filtering built into
`TransportGetComposableIndexTemplateAction` rather than retrieving all
templates and then filtering them on the coordinating node.
2021-10-13 12:13:06 +01:00
xiaoping
7e08c6b98a
Data stream support read and write with custom routing and partition size (#74394) 2021-10-11 07:14:15 -05:00