Commit graph

734 commits

Author SHA1 Message Date
Pete Gillin
d85b90ad8c
Remove unfreeze REST endpoint (#119227)
This adds a sentence to `redirects.asciidoc` explaining what frozen
indices were - otherwise, everything will point to the message about
the unfreeze API having gone away, which is not very helpful. Some
cross-references are updated to point to this rather than to the
notice about the removal of the unfreeze API.

ES-9736 #comment Removed `_unfreeze` REST endpoint in https://github.com/elastic/elasticsearch/pull/119227
2025-01-14 10:34:46 +00:00
Niels Bauman
80e8017bb6
Run TransportGetIndexTemplatesAction on local node (#119837)
This action solely needs the cluster state, it can run on any node.
Additionally, it needs to be cancellable to avoid doing unnecessary work
after a client failure or timeout.

As a drive-by, this removes another usage of the trappy default master
node timeout.
2025-01-10 00:20:16 +00:00
Niels Bauman
65e4ec129c
Run TransportGetComposableIndexTemplate on local node (#119830)
This action solely needs the cluster state, it can run on any node.
Additionally, it needs to be cancellable to avoid doing unnecessary work
after a client failure or timeout.

As a drive-by, this removes another usage of the trappy default master
node timeout.
2025-01-10 09:00:31 +10:00
Michael Peterson
230acb8ac5
Resolve/cluster should mark remotes as not connected when a security exception is thrown (#119793)
Fixes two bugs in _resolve/cluster.

First, the code that detects older clusters versions and does a fallback to the _resolve/index
endpoint was using an outdated string match for error detection. That has been adjusted.

Second, upon security exceptions, the _resolve/cluster endpoint was marking the clusters as connected: true,
under the assumption that all security exceptions related to cross cluster calls and remote index access were
coming from the remote cluster, but that is not always the case. Some cross-cluster security violations can
be detected on the local querying cluster after issuing the remoteClient.execute call but before the transport
layer actually sends the request remotely. So we now mark the connected status as false for all ElasticsearchSecurityException cases. End user docs have been updated with this information.
2025-01-09 08:56:57 -05:00
shainaraskas
17111e1258
[DOCS] Concept cleanup 2 - ES settings (#119373) 2025-01-06 12:07:15 -05:00
Edoardo Tenani
171424727a
[DOCS] update recommended template priority for override to 500 (#119450) 2025-01-03 11:12:25 +01:00
Lisa Cawley
ba8beecdb0
[DOCS] More links to new API site (#119377) 2024-12-31 11:32:29 -08:00
Lisa Cawley
5e0fbef58b
[DOCS] Link to new API site (#119038)
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2024-12-30 16:52:16 +00:00
Niels Bauman
9641c7623f
Run TransportGetComponentTemplateAction on local node (#116868)
This action solely needs the cluster state, it can run on any node.
Additionally, it needs to be cancellable to avoid doing unnecessary work
after a client failure or timeout.

The `?local` parameter becomes a no-op and is marked as deprecated.

Relates #101805
Relates #107984
2024-12-23 20:01:21 +00:00
Tanguy Leroux
103d29f0c8
Revert min_read_only_index_version in doc after #119083 (#119125) 2024-12-20 05:38:09 +11:00
Tanguy Leroux
f3a1664906
Add min. read-only index version compatible to DiscoveryNode (#118744)
#118443 added a new index version for indices that can be opened in read-only mode by Lucene. This change adds this information to the discovery node's VersionInformation and the transport serialization logic.

In a short future we'd like to use this information in methods like IndexMetadataVerifier#checkSupportedVersion and NodeJoineExecutor to allow opening indices in N-2 versions as read-only indices on ES V9.
2024-12-17 18:59:49 +01:00
Marci W
ae9bb90fd1
Update and edit logsdb docs for logsdb / synthetic source GA (#118303)
* Update licensing; fix screenshots; edit generally

* Small edit for clarity and style

* Update docs/reference/index-modules.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Apply changes from review

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Address review comments

* Match similar change from review

* More changes from review

* Apply suggestions from review

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>

* Apply suggestions from review

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>

* Update docs/reference/data-streams/logs.asciidoc

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>

* Apply suggestions from review

Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>

* Apply suggestions from review

* Change to general subscription note

* Apply suggestions from review

Co-authored-by: Oleksandr Kolomiiets <olkolomiiets@gmail.com>

* Apply suggestions from review

Co-authored-by: Oleksandr Kolomiiets <olkolomiiets@gmail.com>

* Apply suggestions from review; additional edits

* Apply suggestions from review; clarity tweaks

* Restore previous paragraph structure and context

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
Co-authored-by: Oleksandr Kolomiiets <olkolomiiets@gmail.com>
2024-12-11 13:24:24 -05:00
Niels Bauman
032b42fcf7
Make TransportLocalClusterStateAction wait for cluster to unblock (#117230)
This will make `TransportLocalClusterStateAction` wait for a new state
that is not blocked. This means we need a timeout (again). For
consistency's sake, we're reusing the REST param `master_timeout` for
this timeout as well.

The only class that was using `TransportLocalClusterStateAction` was
`TransportGetAliasesAction`, so its request needed to accept a timeout
again as well.
2024-12-04 12:17:13 +01:00
Pete Gillin
d7a9575d03
Remove deprecated local parameter from alias APIs (#115393)
This removes the `local` parameter from the `GET /_alias`, `HEAD /_alias`, and `GET /_cat/aliases` APIs. This option became a no-op and was deprecated in 8.12 by https://github.com/elastic/elasticsearch/pull/101815.

We continue to accept the parameter (deprecated, with no other effect) in v8 compatibility mode for `GET /_alias` and `HEAD /_alias`. We don't do this for `GET /_cat/aliases` where the [compatibility policy does not apply](https://github.com/elastic/elasticsearch/blob/main/REST_API_COMPATIBILITY.md#when-not-to-apply).
2024-10-24 15:58:24 +01:00
Johannes Mahne
e97aaa8c41
Update forcemerge.asciidoc (#114377)
As per request https://github.com/elastic/elasticsearch/pull/114315#issuecomment-2400521895 doing the PR on the main branch.
2024-10-09 13:47:24 +02:00
Keith Massey
fb482f863d
Adding index_template_substitutions to the simulate ingest API (#114128)
This adds support for a new `index_template_substitutions` field to the
body of an ingest simulate API request. These substitutions can be used
to change the pipeline(s) used for ingest, or to change the mappings
used for validation. It is similar to the
`component_template_substitutions` added in #113276. Here is an example
that shows both of those usages working together:

```
## First, add a couple of pipelines that set a field to a boolean:
PUT /_ingest/pipeline/foo-pipeline?pretty
{
  "processors": [
    {
      "set": {
        "field": "foo",
        "value": true
      }
    }
  ]
}

PUT /_ingest/pipeline/bar-pipeline?pretty
{
  "processors": [
    {
      "set": {
        "field": "bar",
        "value": true
      }
    }
  ]
}

## Now, create three component templates. One provides a mapping enforces that the only field is "foo"
## and that field is a keyword. The next is similar, but adds a `bar` field. The final one provides a setting
## that makes "foo-pipeline" the default pipeline.
## Remember that the "foo-pipeline" sets the "foo" field to a boolean, so using both of these templates
## together would cause a validation exception. These could be in the same template, but are provided
## separately just so that later we can show how multiple templates can be overridden.
PUT _component_template/mappings_template
{
  "template": {
    "mappings": {
      "dynamic": "strict",
      "properties": {
        "foo": {
          "type": "keyword"
        }
      }
    }
  }
}

PUT _component_template/mappings_template_with_bar
{
    "template": {
      "mappings": {
        "dynamic": "strict",
        "properties": {
          "foo": {
            "type": "keyword"
          },
          "bar": {
            "type": "boolean"
          }
        }
      }
    }
}

PUT _component_template/settings_template
{
  "template": {
    "settings": {
      "index": {
        "default_pipeline": "foo-pipeline"
      }
    }
  }
}

## Here we create an index template  pulling in both of the component templates above
PUT _index_template/template_1
{
  "index_patterns": ["foo*"],
  "composed_of": ["mappings_template", "settings_template"]
}

## We can index a document here to create the index, or not. Either way the simulate call ought to work the same
POST foo-1/_doc
{
  "foo": "FOO"
}

## This will not blow up with validation exceptions because the substitute "index_template_substitutions"
## uses `mappings_template_with_bar`, which adds the bar field.
## And the bar-pipeline is executed rather than the foo-pipeline because the substitute
## "index_template_substitutions" uses a substitute `settings_template`, so the value of "foo"
## does not get set to an invalid type.
POST _ingest/_simulate?pretty&index=foo-1
{
  "docs": [
    {
      "_id": "asdf",
      "_source": {
        "foo": "foo",
        "bar": "bar"
      }
    }
  ],
  "component_template_substitutions": {
    "settings_template": {
      "template": {
        "settings": {
          "index": {
            "default_pipeline": "bar-pipeline"
          }
        }
      }
    }
  },
  "index_template_substitutions": {
    "template_1": {
      "index_patterns": ["foo*"],
      "composed_of": ["mappings_template_with_bar", "settings_template"]
    }
  }
}
```
2024-10-09 10:15:37 +11:00
Keith Massey
cd950bb2fa
Adding component template substitutions to the simulate ingest API (#113276) 2024-09-25 15:30:22 -05:00
Smriti
0638d3977a
Update index-templates.asciidoc (#113461)
Adding `security_solution-*-*` in list of index nae to avoid the pattern collisions.
2024-09-25 13:55:17 +02:00
Simon Cooper
a36d90cf34
Use CLDR locale provider on JDK 23+ (#110222)
JDK 23 removes the COMPAT locale provider, leaving CLDR as the only option. This commit configures Elasticsearch
to use the CLDR provider when on JDK 23, but still use the existing COMPAT provider when on JDK 22 and below.

This causes some differences in locale behaviour; this also adapts various tests to still work whether run on COMPAT or CLDR.
2024-09-04 13:42:40 +01:00
Lee Hinman
4ae88f98dc
Add 'verbose' flag retrieving maximum_timestamp for get data stream API (#112303)
This commit adds support for the `verbose` querystring parameter to the
get data stream API (`GET /_data_stream/{name}`).

The flag defaults to "false".

When set to true, the `maximum_timestamp` for the data stream will be
retrieved and returned for each data stream retrieved. This is the same
information available from the data stream stats API (and internally
uses the same action to retrieval).
2024-08-31 03:18:15 +10:00
shainaraskas
50bccf5609
Round up shard allocation / recovery / relocation concepts (#109943) 2024-07-25 14:44:57 -04:00
Iraklis Psaroudakis
89c8e8e06b
Correct force merge disk space requirements (#111066)
Correct force merge disk space requirements
2024-07-19 11:31:05 +03:00
Niels Bauman
ba91bfdc94
Lazily create the failure store (#109289)
Rather than initializing the failure store right away when a new
data stream is created, we leave it empty and mark it for lazy
rollover. This results in the failure store only being initialized
(i.e. an index created) when a failure has actually occurred.

The exception to the rule is when a failure occurs while the data
stream is being auto-created. In that case, we do want to initialize
the failure store right away.
2024-06-19 13:18:47 +02:00
Niels Bauman
45b8c3d20c
Use unique index patterns in template tests (#108946)
These patterns overlapped with certain templates from
the APM plugin.
2024-05-23 20:22:58 +02:00
Nick Tindall
3ecdd77e97
[DOCS] Align docs to implementation for timeout parameters (#108593)
* [DOCS] Fix documentation for timeout-related parameters

Closes #108224
2024-05-16 13:05:39 +10:00
Niels Bauman
920290a37b
Extract DataStreamIndices from DataStream class (#107562)
We were seeing more and more common fields between "regular" backing indices and failure store indices (i.e. `indices`, `rolloverOnWrite`, `autoShardingEvent`). To avoid having to duplicate these fields (and possibly any future fields), we extract a class that contains these fields.
2024-05-14 11:14:13 +02:00
Tommaso Teofili
cfc8e71e37
Add per-field KNN vector format to Index Segments API (#107216)
Add per-field knn format to Index Segments API, an optional 
vector_formats param can be passed to the REST call
to get per-field vector formats for each segment
2024-04-23 10:12:50 +02:00
Liam Thompson
33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* Remove `es-test-dir` book-scoped variable

* Remove `plugins-examples-dir` book-scoped variable

* Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables

- In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed.
- In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path
- In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem

* Replace `es-repo-dir` with `es-ref-dir`

* Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
2024-04-17 14:37:07 +02:00
Parker Timmins
75228dfd45
Add granular error list to alias action response (#106514)
When an alias action list is posted with must_exist==false, and succeeds only partially, a list of results for each action are now returned. The results contain information about the requested action, indices, and aliases. If must_exist==true, or all actions fail, the call will return a 400 status along with the associated exception.
2024-04-09 12:11:49 -05:00
Lee Hinman
601176364e
Call out monitor privilege for index and component templates (#106970)
These can be retrieved using the `monitor` cluster privilege. This just adds that note to the docs.
2024-04-01 15:52:27 -06:00
Lee Hinman
9a049a1092
Use index block API in shrink/split/clone docs (#105997)
This uses the dedicated index block API in the docs for the shrink, split, and clone APIs, rather than putting the block in as a setting directly. The specialized API will wait for ongoing operations to finish, which is better during indexing operations.

Resolves #105831
2024-03-06 09:46:27 -07:00
Stef Nestor
8cc438ea8e
(+DOC)(ILM) Shrink recovers to specific node (#105872) 2024-03-01 19:40:33 +01:00
Michael Peterson
33e22c4467
Docs improvements for the new resolve/cluster API (#105297) 2024-02-08 13:36:07 -05:00
Michael Peterson
ac36aa7795
Resolve Cluster API (#102726)
To improve cross-cluster search user experience, Kibana needs an endpoint that is accessible
by arbitrary Kibana dashboard search users and provides:

1. a listing of clusters in scope for a CCS query (based on the index expression and whether 
there are any indices on each cluster that the Kibana user has access to query).
2. whether that cluster is currently connected to the querying cluster (will it come back as 
skipped or failed in a CCS search)
3. showing the skip_unavailable setting for those clusters (so you can know whether it will
return skipped or failed in a CCS search)
4. the ES version of the cluster

Since no single Elasticsearch endpoint provides all of these features, this PR creates a new endpoint `_resolve/cluster` that works along side the existing `_resolve/index` endpoint 
(and leverages some of its features).

Example usage against a cluster with 2 remote clusters configured:

GET /_resolve/cluster/*,remote*:bl*

Response:

{
  "(local)": {
    "connected": true,
    "skip_unavailable": false,
    "matching_indices": true,
    "version": {
      "number": "8.12.0-SNAPSHOT",
      "build_flavor": "default",
      "minimum_wire_compatibility_version": "7.17.0",
      "minimum_index_compatibility_version": "7.0.0"
    }
  },
  "remote2": {
    "connected": true,
    "skip_unavailable": true,
    "matching_indices": true,
    "version": {
      "number": "8.12.0-SNAPSHOT",
      "build_flavor": "default",
      "minimum_wire_compatibility_version": "7.17.0",
      "minimum_index_compatibility_version": "7.0.0"
    }
  },
  "remote1": {
    "connected": true,
    "skip_unavailable": false,
    "matching_indices": false,
    "version": {
      "number": "8.12.0-SNAPSHOT",
      "build_flavor": "default",
      "minimum_wire_compatibility_version": "7.17.0",
      "minimum_index_compatibility_version": "7.0.0"
    }
  }
}

Almost all errors show up as "error" entries in the response.
Only the local SecurityException returns a 403 since that happens before the ResolveCluster
Transport code kicks in.
2024-02-08 10:50:05 -05:00
Yang Wang
931f2c48c9
[Docs] Fix a doc bug for Flush API's force parameter (#105112)
The force parameter defaults to false instead of true.
2024-02-05 21:06:09 +11:00
Mary Gouseti
046cdeae23
Introduce lazy rollover for mapping updates in data streams (#103309)
In this PR we implement the idea to introduce a flag, that a data stream needs to be rolloved over before the next document is indexed.
2024-01-08 15:07:16 +02:00
James Baiera
6fa7f60073
Add ability to create a data stream failure store (#99134)
Adds the ability to configure a data stream to create a new kind of backing index called a failure store which will eventually be used to store error information when ingest pipelines fail to ingest a document or when a document fails to be parsed correctly by the configured mapping on the data stream.
2023-11-15 15:32:51 -05:00
Keith Massey
65d26b2d49
Allowing non-dynamic index settings to be updated by automatically unassigning shards (#101723) 2023-11-10 08:21:51 -06:00
Abdon Pijpelink
70128f5b74
[DOCS] Mark 'ignore_throttled' deprecated in all docs (#101838) 2023-11-07 13:03:49 +01:00
Felix Barnsteiner
978a5469ce
Add support for marking component templates as deprecated (#101148) 2023-11-02 19:28:20 +01:00
James Rodewig
4c69746c24
[DOCS] Update tech preview copy (#101606)
Updates the copy for tech preview and experimental features in the Elasticsearch docs.

Relates to https://github.com/elastic/docs/pull/2807
2023-10-31 10:31:07 -04:00
Felix Barnsteiner
75d9bd7790
Rename component templates and pipelines according to the new naming conventions (#99975)
- Creates a new StackTemplateRegistry that uses the new names
- The new registry only respects stack.templates.enabled for index templates
- Renames the old registry to LegacyStackTemplateRegistry
- Component templates are not duplicated but registered under two different names
- Documents the new naming convention
- Index templates are not renamed, at least for now, as there are some challenges with it
  See 7fd0423 for more details.
2023-10-25 11:56:28 +02:00
gchaps
cfa11d2df3
[DOCS] Adds enrich policies and data retention for Index Management (#100922)
* [DOCS] Adds enrich policies and data retention for Index Management

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

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

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

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

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

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

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

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

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

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

* [DOCS] Incorporates review comments

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-10-19 07:24:52 -07:00
Andrei Dan
839afdc331
Promote the Data stream lifecycle feature to Technical Preview (#100187)
This releases the Data stream lifecycle feature as a
Technical Preview feature.

Data stream lifecycle, albeit in technical preview, will allow data streams
to take advantage of a native simplified and resilient lifecycle implementation.
2023-10-03 17:12:35 +01:00
Andrei Dan
f202ad02fe
GET _data_stream displays both ILM and DSL information (#99947)
This add support to the `GET _data_stream` API for displaying the value
of the `index.lifecycle.prefer_ilm` setting both at the backing index
level and at the top level (top level meaning, similarly to the existing
`ilm_policy` field, the value in the index template that's backing the
data stream), an `ilm_policy` field for each backing index displaying
the actual ILM policy configured for the index itself, a `managed_by`
field for each backing index indicating who manages this index (the
possible values are: `Index Lifecycle Management`, `Data stream
lifecycle`, and `Unmanaged`).

This also adds a top level field to indicate which system would manage
the next generation index for this data stream based on the current
configuration. This field is called `next_generation_managed_by` and the
same values as the indices level `managed_by` field has are available.

An example output for a data stream that has 2 backing indices managed
by ILM and the write index by DSL:

```
{
	"data_streams": [{
		"name": "datastream-psnyudmbitp",
		"timestamp_field": {
			"name": "@timestamp"
		},
		"indices": [{
			"index_name": ".ds-datastream-psnyudmbitp-2023.09.27-000001",
			"index_uuid": "kyw0WEXvS8-ahchYS10NRQ",
                        "prefer_ilm": true,
			"ilm_policy": "policy-uVBEI",
			"managed_by": "Index Lifecycle Management"
		}, {
			"index_name": ".ds-datastream-psnyudmbitp-2023.09.27-000002",
			"index_uuid": "pDLdc4DERwO54GRzDr4krw",
			"prefer_ilm": true,
			"ilm_policy": "policy-uVBEI",
			"managed_by": "Index Lifecycle Management"
		}, {
			"index_name": ".ds-datastream-psnyudmbitp-2023.09.27-000003",
			"index_uuid": "gYZirLKcS3mlc1c3oHRpYw",
			"prefer_ilm": false,
			"ilm_policy": "policy-uVBEI",
                        "managed_by": "Data stream lifecycle"
		}],
		"generation": 3,
		"status": "YELLOW",
		"template": "indextemplate-obcvkbjqand",
		"lifecycle": {
			"enabled": true,
			"data_retention": "90d"
		},
		"ilm_policy": "policy-uVBEI",
                "next_generation_managed_by": "Data stream lifecycle",
		"prefer_ilm": false,
		"hidden": false,
		"system": false,
		"allow_custom_routing": false,
		"replicated": false
	}]
}
```
2023-09-28 13:48:17 -04:00
Yulia Čech
d6526f8d4b
[Index Management] Update docs screenshots with for the new index details page (#99973) 2023-09-28 13:41:53 +02:00
David Turner
8b2a9c646b
Add breaking change docs for #92820 (#99849)
In #92820 we adjusted the indices resolve API to use the
`IndexNameExpressionResolver` to align its behaviour with other similar
APIs, but this was a subtle breaking change in its behaviour when there
were no matching indices. This adds a note in the docs to record this
change in behaviour.
2023-09-27 16:00:22 +01:00
Joe Gallo
404aa77849
Fix a typo in the data_stream _stats API documentation (#99438) 2023-09-11 15:13:50 -04:00
Simon Cooper
9538208fb7
Fix shard-stores doc test (#98581)
The replacement wasn't actually doing anything due to different JSON types
2023-08-17 11:38:31 +01:00
amyjtechwriter
7e907f804a
[DOCS]Corrections for index-mgmt page. (#98481)
* Corrections for index-mgmt page.

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

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

---------

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2023-08-15 16:38:04 +01:00