You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy-manage/upgrade/deployment-or-cluster/reading-indices-from-older-elasticsearch-versions.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,51 +5,51 @@ mapped_pages:
5
5
6
6
# Reading indices from older {{es}} versions [archive-indices]
7
7
8
-
{{es}} has full query and write support for indices created in the previous major version. If you have indices created in {{es}} version 7, you can now use the archive functionality to import them into newer {{es}} versions as well.
8
+
{{es}} has full query and write support for indices created in the previous major version. If you have indices created in {{es}} versions 5, 6, or 7, you can now use the archive functionality to import them into newer {{es}} versions as well.
9
9
10
10
The archive functionality provides slower read-only access to older {{es}} data, for compliance or regulatory reasons, the occasional lookback or investigation, or to rehydrate parts of it. Access to the data is expected to be infrequent, and can therefore happen with limited performance and query capabilities.
11
11
12
-
For this, {{es}} has the ability to access older snapshot repositories. The legacy indices in the [snapshot repository](../../tools/snapshot-and-restore.md) can either be [restored](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore), or directly accessed through [searchable snapshots](../../tools/snapshot-and-restore/searchable-snapshots.md) so that the archived data won’t need to fully reside on local disks for access.
12
+
For this, {{es}} can access older snapshot repositories going back to version 5. The legacy indices in the [snapshot repository](../../tools/snapshot-and-restore.md) can either be [restored](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore) or directly accessed through [searchable snapshots](../../tools/snapshot-and-restore/searchable-snapshots.md) so that the archived data won’t need to fully reside on local disks for access.
13
13
14
14
15
15
## Supported field types [archive-indices-supported-field-types]
16
16
17
-
Old mappings are imported as much "as-is" as possible into {{es}} 8, but only provide regular query capabilities on a select subset of fields:
17
+
Old mappings are imported as much as possible into {{es}} 9, but only provide regular query capabilities on a select subset of fields:
*[`date` types](elasticsearch://reference/elasticsearch/mapping-reference/date.md): the date `format` setting on date fields is supported as long as it behaves similarly across these versions. In case it is not, for example [when using custom date formats](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/migrate-to-java-time.html), this field can be updated on legacy indices so that it can be changed by a user if need be.
24
-
*[`keyword` type](elasticsearch://reference/elasticsearch/mapping-reference/keyword.md#keyword-field-type): the`normalizer` setting on keyword fields is supported as long as it behaves similarly across these versions. In case it is not, this field can be updated on legacy indices if need be.
25
-
*[`text` type](elasticsearch://reference/elasticsearch/mapping-reference/text.md#text-field-type): scoring capabilities are limited, and all queries return constant scores that are equal to 1.0. The `analyzer` settings on text fields are supported as long as they behave similarly across these versions. In case they do not, they can be updated on legacy indices if need be.
23
+
*[`date` types](elasticsearch://reference/elasticsearch/mapping-reference/date.md): the date `format` setting on date fields is supported as long as it behaves similarly across these versions. If it is not, for example,[when using custom date formats](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/migrate-to-java-time.html), this field can be updated on legacy indices so a user can change it if needed.
24
+
*[`keyword` type](elasticsearch://reference/elasticsearch/mapping-reference/keyword.md#keyword-field-type): The`normalizer` setting on keyword fields is supported as long as it behaves similarly across these versions. If they do not, they can be updated on legacy indices if necessary.
25
+
*[`text` type](elasticsearch://reference/elasticsearch/mapping-reference/text.md#text-field-type): Scoring capabilities are limited, and all queries return constant scores equal to 1.0. The `analyzer` settings on text fields are supported as long as they behave similarly across these versions. If they don't, they can be updated on legacy indices.
{{es}} 7 indices with mappings that have [multiple mapping types](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html) are collapsed together on a best-effort basis before they are imported.
33
+
{{es}} 5 indices with mappings that have [multiple mapping types](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html) are collapsed together on a best-effort basis before being imported.
34
34
35
-
In case the auto-import of mappings does not work, or the new {{es}} version can’t make sense of the mapping, it falls back to importing the index without the mapping, but stores the original mapping in the [_meta](elasticsearch://reference/elasticsearch/mapping-reference/mapping-meta-field.md) section of the imported index. The legacy mapping can then be introspected using the [GET mapping](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping) API and an updated mapping can be manually put in place using the [update mapping](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) API, copying and adapting relevant sections of the legacy mapping to work with the current {{es}} version. While auto-import is expected to work in most cases, failures of doing so should be [raised](https://github.com/elastic/elasticsearch/issues/new/choose) with the Elastic team for future improvements.
35
+
If auto-importing mappings does not work, or the new {{es}} version doesn't understand the mapping, it falls back to importing the index without the mapping, but stores the original mapping in the [_meta](elasticsearch://reference/elasticsearch/mapping-reference/mapping-meta-field.md) section of the imported index. Users can then examine the legacy mapping using the [GET mapping](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping) API, and manually update the mapping using the [update mapping](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) API, copying and adapting relevant sections of the legacy mapping to work with the current {{es}} version. While auto-import is expected to work in most cases, any failures should be [raised](https://github.com/elastic/elasticsearch/issues/new/choose) with the Elastic team for future improvements.
36
36
37
37
38
38
## Supported APIs [_supported_apis]
39
39
40
-
Archive indices are read-only, and provide data access through the [search](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) and [field capabilities](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps) APIs. They do not support the [Get API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get)nor any write APIs.
40
+
Archive indices are read-only and provide data access through the [search](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) and [field capabilities](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps) APIs. They do not support the [Get API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get)or any write APIs.
41
41
42
-
Archive indices allow running queries as well as aggregations as long as they are [supported by the given field type](#archive-indices-supported-field-types).
42
+
Archive indices allow running queries and aggregations if the [field type](#archive-indices-supported-field-types) supports them.
43
43
44
-
Due to `_source` access, the data can also be [reindexed](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex) to a new index that has full compatibility with the current {{es}} version.
44
+
Due to `_source` access, the data can also be [reindexed](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex) to a new index that's fully compatible with the current {{es}} version.
1. Take a snapshot of the indices in the old cluster.
52
-
2. Delete any indices that were created before 8.0.0.
52
+
2. Delete any indices created before 8.0.0.
53
53
3. Upgrade the cluster without the old indices, then [restore](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-restore) the legacy indices from the snapshot or [mount](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-mount) them using searchable snapshots.
54
54
55
55
% In the future, we plan on streamlining the upgrade process going forward, making it easier to take legacy indices along when going to future major {{es}} versions.
0 commit comments