Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit b16fc3c

Browse files
cpjuliaansobolevaSimran-B
authored
Added documentation for feature/disallow-smart-index-fields (#1086)
* Added documentation for feature/disallow-smart-index-fields * Review, add remark about dots in index fields too * Add to API changes * applied to 3.11 Co-authored-by: ansoboleva <93702078+ansoboleva@users.noreply.github.com> Co-authored-by: Simran Spiller <simran@arangodb.com>
1 parent aa438a8 commit b16fc3c

File tree

6 files changed

+54
-8
lines changed

6 files changed

+54
-8
lines changed

3.10/indexing-index-basics.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,17 @@ by ArangoDB, without the user being required to create extra indexes for them.
2323
`_id` and `_key` are covered by a collection's primary key, and `_from` and `_to`
2424
are covered by an edge collection's edge index automatically.
2525

26-
Using the system attribute `_id` in user-defined indexes is not possible, but
27-
indexing `_key`, `_rev`, `_from`, and `_to` is.
26+
You cannot use the `_id` system attribute in user-defined indexes, but indexing
27+
`_key`, `_rev`, `_from`, and `_to` is possible.
28+
29+
You cannot index fields that contain `.` in their attribute names because dots
30+
are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]`
31+
indexes the value of the nested attribute `bar` under the top-level attribute
32+
`foo` (`{ "foo": { "bar": "value" } }`) and not a top-level attribute
33+
`foo.bar` (`{ "foo.bar": "value" }`).
34+
35+
You can also not index fields whose names either start or end with `:`, for
36+
example, `fields: ["foo:"]`. This notation is reserved for internal use.
2837

2938
Creating new indexes is by default done under an exclusive collection lock. The collection is not
3039
available while the index is being created. This "foreground" index creation can be undesirable,

3.11/indexing-index-basics.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,17 @@ by ArangoDB, without the user being required to create extra indexes for them.
2323
`_id` and `_key` are covered by a collection's primary key, and `_from` and `_to`
2424
are covered by an edge collection's edge index automatically.
2525

26-
Using the system attribute `_id` in user-defined indexes is not possible, but
27-
indexing `_key`, `_rev`, `_from`, and `_to` is.
26+
You cannot use the `_id` system attribute in user-defined indexes, but indexing
27+
`_key`, `_rev`, `_from`, and `_to` is possible.
28+
29+
You cannot index fields that contain `.` in their attribute names because dots
30+
are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]`
31+
indexes the value of the nested attribute `bar` under the top-level attribute
32+
`foo` (`{ "foo": { "bar": "value" } }`) and not a top-level attribute
33+
`foo.bar` (`{ "foo.bar": "value" }`).
34+
35+
You can also not index fields whose names either start or end with `:`, for
36+
example, `fields: ["foo:"]`. This notation is reserved for internal use.
2837

2938
Creating new indexes is by default done under an exclusive collection lock. The collection is not
3039
available while the index is being created. This "foreground" index creation can be undesirable,

3.11/release-notes-api-changes311.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ integrations for ArangoDB 3.11.
2929

3030
### Endpoints augmented
3131

32+
#### Restriction of indexable fields
3233

34+
It is now forbidden to create indexes that cover fields whose attribute names
35+
start or end with `:` , for example, `fields: ["value:"]`. This notation is
36+
reserved for internal use.
37+
38+
Existing indexes are not affected but you cannot create new indexes with a
39+
preceding or trailing colon using the `POST /_api/index` endpoint.
3340

3441
### Endpoints moved
3542

3.11/release-notes-upgrading-changes311.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ upgrading to ArangoDB 3.11, and adjust any client programs if necessary.
1010

1111
The following incompatible changes have been made in ArangoDB 3.11:
1212

13+
Restriction of indexable fields
14+
-------------------------------
15+
16+
It is now forbidden to create indexes that cover fields whose attribute names
17+
start or end with `:` , for example, `fields: ["value:"]`. This notation is
18+
reserved for internal use.
19+
20+
Existing indexes are not affected but you cannot create new indexes with a
21+
preceding or trailing colon.

3.8/indexing-index-basics.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ by ArangoDB, without the user being required to create extra indexes for them.
2323
`_id` and `_key` are covered by a collection's primary key, and `_from` and `_to`
2424
are covered by an edge collection's edge index automatically.
2525

26-
Using the system attribute `_id` in user-defined indexes is not possible, but
27-
indexing `_key`, `_rev`, `_from`, and `_to` is.
26+
You cannot use the `_id` system attribute in user-defined indexes, but indexing
27+
`_key`, `_rev`, `_from`, and `_to` is possible.
28+
29+
You cannot index fields that contain `.` in their attribute names because dots
30+
are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]`
31+
indexes the value of the nested attribute `bar` under the top-level attribute
32+
`foo` (`{ "foo": { "bar": "value" } }`) and not a top-level attribute
33+
`foo.bar` (`{ "foo.bar": "value" }`).
2834

2935
Creating new indexes is by default done under an exclusive collection lock. The collection is not
3036
available while the index is being created. This "foreground" index creation can be undesirable,

3.9/indexing-index-basics.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ by ArangoDB, without the user being required to create extra indexes for them.
2323
`_id` and `_key` are covered by a collection's primary key, and `_from` and `_to`
2424
are covered by an edge collection's edge index automatically.
2525

26-
Using the system attribute `_id` in user-defined indexes is not possible, but
27-
indexing `_key`, `_rev`, `_from`, and `_to` is.
26+
You cannot use the `_id` system attribute in user-defined indexes, but indexing
27+
`_key`, `_rev`, `_from`, and `_to` is possible.
28+
29+
You cannot index fields that contain `.` in their attribute names because dots
30+
are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]`
31+
indexes the value of the nested attribute `bar` under the top-level attribute
32+
`foo` (`{ "foo": { "bar": "value" } }`) and not a top-level attribute
33+
`foo.bar` (`{ "foo.bar": "value" }`).
2834

2935
Creating new indexes is by default done under an exclusive collection lock. The collection is not
3036
available while the index is being created. This "foreground" index creation can be undesirable,

0 commit comments

Comments
 (0)