From 9592f761fe5aefda9ec27ad9c2d2a9636ee60c60 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Mon, 9 Oct 2023 19:39:26 +0200 Subject: [PATCH 1/2] update release notes for `_id` in stored values --- .../3.12/release-notes/version-3.12/whats-new-in-3-12.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md b/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md index a3985b8200..2014da978e 100644 --- a/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md +++ b/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md @@ -61,6 +61,15 @@ Swagger 2.x compatibility. +## Indexing + +### Stored Values can now contain the `_id` attribute + +The usage of the `_id` attribute was previously disallowed inside the stored +values section of persistent indexes. +Using the `_id` attribute in stored values is now allowed in ArangoDB 3.12. + + ## Server options ### LZ4 compression for values in the in-memory edge cache From 056b83ea989eef2359d8fc268a05a4cb847921d5 Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Tue, 10 Oct 2023 17:58:58 +0200 Subject: [PATCH 2/2] Add remarks about _id attributes --- .../3.10/index-and-search/indexing/index-basics.md | 5 ++++- .../indexing/working-with-indexes/_index.md | 6 +++++- .../3.11/index-and-search/indexing/index-basics.md | 5 ++++- .../indexing/working-with-indexes/_index.md | 6 +++++- .../3.12/index-and-search/indexing/index-basics.md | 5 ++++- .../indexing/working-with-indexes/_index.md | 3 ++- .../release-notes/version-3.12/api-changes-in-3-12.md | 11 +++++++++++ .../release-notes/version-3.12/whats-new-in-3-12.md | 10 ++++++---- 8 files changed, 41 insertions(+), 10 deletions(-) diff --git a/site/content/3.10/index-and-search/indexing/index-basics.md b/site/content/3.10/index-and-search/indexing/index-basics.md index 4dc434db3d..a56c30d709 100644 --- a/site/content/3.10/index-and-search/indexing/index-basics.md +++ b/site/content/3.10/index-and-search/indexing/index-basics.md @@ -25,7 +25,10 @@ by ArangoDB, without the user being required to create extra indexes for them. are covered by an edge collection's edge index automatically. You cannot use the `_id` system attribute, nor sub-attributes with this name, in -user-defined indexes, but indexing `_key`, `_rev`, `_from`, and `_to` is possible. +user-defined indexes (except the inverted index type). This applies to the +`fields` the index is defined over, as well as additional attributes you can +store in a persistent index using `storedValues`. However, indexing and storing +the `_key`, `_rev`, `_from`, and `_to` system attributes is possible. You cannot index fields that contain `.` in their attribute names because dots are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]` diff --git a/site/content/3.10/index-and-search/indexing/working-with-indexes/_index.md b/site/content/3.10/index-and-search/indexing/working-with-indexes/_index.md index 456520ee8e..a71ea1d3ac 100644 --- a/site/content/3.10/index-and-search/indexing/working-with-indexes/_index.md +++ b/site/content/3.10/index-and-search/indexing/working-with-indexes/_index.md @@ -137,7 +137,8 @@ Other attributes may be necessary, depending on the index type. The `.` character denotes sub-attributes in attribute paths. Attributes with literal `.` in their name cannot be indexed. Attributes with the name `_id` - cannot be indexed either, neither as a top-level attribute nor as a sub-attribute. + cannot be indexed either, neither as a top-level attribute nor as a sub-attribute + (except the inverted index type). If an attribute path contains an `[*]` extension (e.g. `friends[*].id`), it means that the index attribute value is treated as an array and all array members are @@ -156,6 +157,9 @@ Other attributes may be necessary, depending on the index type. In unique indexes, only the attributes in `fields` are checked for uniqueness, but the attributes in `storedValues` are not checked for their uniqueness. + In `persistent` indexes, you cannot store attributes with the name `_id`, + neither as a top-level attribute nor as a sub-attribute. + - `name`: can be a string. Index names are subject to the same character restrictions as [collection names](../../../concepts/data-structure/collections.md#collection-names). If omitted, a name will be auto-generated so diff --git a/site/content/3.11/index-and-search/indexing/index-basics.md b/site/content/3.11/index-and-search/indexing/index-basics.md index 4dc434db3d..a56c30d709 100644 --- a/site/content/3.11/index-and-search/indexing/index-basics.md +++ b/site/content/3.11/index-and-search/indexing/index-basics.md @@ -25,7 +25,10 @@ by ArangoDB, without the user being required to create extra indexes for them. are covered by an edge collection's edge index automatically. You cannot use the `_id` system attribute, nor sub-attributes with this name, in -user-defined indexes, but indexing `_key`, `_rev`, `_from`, and `_to` is possible. +user-defined indexes (except the inverted index type). This applies to the +`fields` the index is defined over, as well as additional attributes you can +store in a persistent index using `storedValues`. However, indexing and storing +the `_key`, `_rev`, `_from`, and `_to` system attributes is possible. You cannot index fields that contain `.` in their attribute names because dots are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]` diff --git a/site/content/3.11/index-and-search/indexing/working-with-indexes/_index.md b/site/content/3.11/index-and-search/indexing/working-with-indexes/_index.md index aec4c1f07a..4db69a8170 100644 --- a/site/content/3.11/index-and-search/indexing/working-with-indexes/_index.md +++ b/site/content/3.11/index-and-search/indexing/working-with-indexes/_index.md @@ -137,7 +137,8 @@ Other attributes may be necessary, depending on the index type. The `.` character denotes sub-attributes in attribute paths. Attributes with literal `.` in their name cannot be indexed. Attributes with the name `_id` - cannot be indexed either, neither as a top-level attribute nor as a sub-attribute. + cannot be indexed either, neither as a top-level attribute nor as a sub-attribute + (except the inverted index type). If an attribute path contains an `[*]` extension (e.g. `friends[*].id`), it means that the index attribute value is treated as an array and all array members are @@ -156,6 +157,9 @@ Other attributes may be necessary, depending on the index type. In unique indexes, only the attributes in `fields` are checked for uniqueness, but the attributes in `storedValues` are not checked for their uniqueness. + In `persistent` indexes, you cannot store attributes with the name `_id`, + neither as a top-level attribute nor as a sub-attribute. + - `name`: can be a string. Index names are subject to the same character restrictions as [collection names](../../../concepts/data-structure/collections.md#collection-names). If omitted, a name will be auto-generated so diff --git a/site/content/3.12/index-and-search/indexing/index-basics.md b/site/content/3.12/index-and-search/indexing/index-basics.md index 4dc434db3d..dac6399af5 100644 --- a/site/content/3.12/index-and-search/indexing/index-basics.md +++ b/site/content/3.12/index-and-search/indexing/index-basics.md @@ -25,7 +25,10 @@ by ArangoDB, without the user being required to create extra indexes for them. are covered by an edge collection's edge index automatically. You cannot use the `_id` system attribute, nor sub-attributes with this name, in -user-defined indexes, but indexing `_key`, `_rev`, `_from`, and `_to` is possible. +user-defined indexes (except the inverted index type). This applies to the +`fields` the index is defined over but not the additional attributes you can +store in a persistent index using `storedValues`. Indexing and storing +the `_key`, `_rev`, `_from`, and `_to` system attributes is possible. You cannot index fields that contain `.` in their attribute names because dots are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]` diff --git a/site/content/3.12/index-and-search/indexing/working-with-indexes/_index.md b/site/content/3.12/index-and-search/indexing/working-with-indexes/_index.md index aec4c1f07a..17a184f823 100644 --- a/site/content/3.12/index-and-search/indexing/working-with-indexes/_index.md +++ b/site/content/3.12/index-and-search/indexing/working-with-indexes/_index.md @@ -137,7 +137,8 @@ Other attributes may be necessary, depending on the index type. The `.` character denotes sub-attributes in attribute paths. Attributes with literal `.` in their name cannot be indexed. Attributes with the name `_id` - cannot be indexed either, neither as a top-level attribute nor as a sub-attribute. + cannot be indexed either, neither as a top-level attribute nor as a sub-attribute + (except the inverted index type). If an attribute path contains an `[*]` extension (e.g. `friends[*].id`), it means that the index attribute value is treated as an array and all array members are diff --git a/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md b/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md index 0316f2c29d..4c7b722416 100644 --- a/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md +++ b/site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md @@ -43,6 +43,17 @@ unknown attributes and values are detected in the request body. Note that all invalid elements and combinations will be rejected in future versions. +#### Index API + +##### Stored values can contain the `_id` attribute + +The usage of the `_id` system attribute was previously disallowed for +`persistent` indexes inside of `storedValues`. This is now allowed in v3.12. + +Note that it is still forbidden to use `_id` as a top-level attribute or +sub-attribute in `fields` of persistent indexes. On the other hand, inverted +indexes have been allowing to index and store the `_id` system attribute. + ### Privilege changes diff --git a/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md b/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md index 2014da978e..b9f604ceaa 100644 --- a/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md +++ b/site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md @@ -63,12 +63,14 @@ Swagger 2.x compatibility. ## Indexing -### Stored Values can now contain the `_id` attribute +### Stored values can contain the `_id` attribute -The usage of the `_id` attribute was previously disallowed inside the stored -values section of persistent indexes. -Using the `_id` attribute in stored values is now allowed in ArangoDB 3.12. +The usage of the `_id` system attribute was previously disallowed for +`persistent` indexes inside of `storedValues`. This is now allowed in v3.12. +Note that it is still forbidden to use `_id` as a top-level attribute or +sub-attribute in `fields` of persistent indexes. On the other hand, inverted +indexes have been allowing to index and store the `_id` system attribute. ## Server options