8000 documentation-3.8/swagger-2021-08-24 (#14683) · arangodb/arangodb@51e1c4f · GitHub
[go: up one dir, main page]

Skip to content

Commit 51e1c4f

Browse files
authored
documentation-3.8/swagger-2021-08-24 (#14683)
* Improve description of PUT /_api/collection/{coll}/properties Add missing properties, formatting * Document cacheEnabled property for collections * Fix build error
1 parent 1924872 commit 51e1c4f

File tree

3 files changed

+56
-44
lines changed

3 files changed

+56
-44
lines changed

Documentation/DocuBlocks/Rest/Collections/1_structs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ specifies the type of the key generator. The currently
1313
available generators are *traditional*, *autoincrement*, *uuid*
1414
and *padded*.
1515

16+
@RESTSTRUCT{cacheEnabled,collection_info,boolean,required,}
17+
Whether the in-memory hash cache for documents is enabled for this
18+
collection.
19+
1620
@RESTSTRUCT{allowUserKeys,key_generator_type,boolean,required,}
1721
if set to *true*, then it is allowed to supply
1822
own key values in the *_key* attribute of a document. If set to

Documentation/DocuBlocks/Rest/Collections/post_api_collection.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ The following values for *type* are valid:<br>
7373
- *2*: document collection
7474
- *3*: edge collection
7575

76+
@RESTBODYPARAM{cacheEnabled,boolean,optional,}
77+
Whether the in-memory hash cache for documents should be enabled for this
78+
collection (default: *true*). Can be controlled globally with the `--cache.size`
79+
startup option. The cache can speed up repeated reads of the same documents via
80+
their document keys. If the same documents are not fetched often or are
81+
modified frequently, then you may disable the cache to avoid the maintenance
82+
costs.
83+
7684
@RESTBODYPARAM{numberOfShards,integer,optional,int64}
7785
(The default is *1*): in a cluster, this value determines the
7886
number of shards to create for the collection. In a single

Documentation/DocuBlocks/Rest/Collections/put_api_collection_properties.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,50 +16,50 @@ You should reference them via their names instead.
1616
The name of the collection.
1717

1818
@RESTDESCRIPTION
19-
Changes the properties of a collection. Expects an object with the
20-
attribute(s)
21-
22-
- *waitForSync*: If *true* then creating or changing a
23-
document will wait until the data has been synchronized to disk.
24-
25-
- *schema*: Object that specifies the collection level schema
26-
for documents. The attribute keys `rule`, `level` and `message` must follow
27-
the rules documented in [Document Schema Validation](https://www.arangodb.com/docs/stable/document-schema-validation.html)
28-
29-
On success an object with the following attributes is returned:
30-
31-
- *id*: The identifier of the collection.
32-
33-
- *name*: The name of the collection.
34-
35-
- *waitForSync*: The new value.
36-
37-
- *status*: The status of the collection as number.
38-
39-
- *type*: The collection type. Valid types are:
40-
- 2: document collection
41-
- 3: edges collection
42-
43-
- *isSystem*: If *true* then the collection is a system collection.
44-
45-
- *keyOptions*: JSON object which contains key generation options:
46-
- *type*: specifies the type of the key generator. The currently
47-
available generators are *traditional*, *autoincrement*, *uuid*
48-
and *padded*.
49-
- *allowUserKeys*: if set to *true*, then it is allowed to supply
50-
own key values in the *_key* attribute of a document. If set to
51-
*false*, then the key generator is solely responsible for
52-
generating keys and supplying own key values in the *_key* attribute
53-
of documents is considered an error.
54-
55-
* *schema* (optional, default is *null*):
56-
Object that specifies the collection level schema for documents.
57-
The attribute keys `rule`, `level` and `message` must follow the rules
58-
documented in [Document Schema Validation](https://www.arangodb.com/docs/stable/document-schema-validation.html)
59-
60-
**Note**: except for *waitForSync* and *name*, collection
61-
properties **cannot be changed** once a collection is created. To rename
62-
a collection, the rename endpoint must be used.
19+
Changes the properties of a collection. Only the provided attributes are
20+
updated. Collection properties **cannot be changed** once a collection is
21+
created except for the listed properties, as well as the collection name via
22+
the rename endpoint (but not in clusters).
23+
24+
@RESTBODYPARAM{waitForSync,boolean,optional,}
25+
If *true* then the data is synchronized to disk before returning from a
26+
document create, update, replace or removal operation. (default: false)
27+
28+
@RESTBODYPARAM{cacheEnabled,boolean,optional,}
29+
Whether the in-memory hash cache for documents should be enabled for this
30+
collection (default: *true*). Can be controlled globally with the `--cache.size`
31+
startup option. The cache can speed up repeated reads of the same documents via
32+
their document keys. If the same documents are not fetched often or are
33+
modified frequently, then you may disable the cache to avoid the maintenance
34+
costs.
35+
36+
@RESTBODYPARAM{schema,object,optional,}
37+
Optional object that specifies the collection level schema for
38+
documents. The attribute keys `rule`, `level` and `message` must follow the
39+
rules documented in [Document Schema Validation](https://www.arangodb.com/docs/stable/document-schema-validation.html)
40+
41+
@RESTBODYPARAM{replicationFactor,integer,optional,int64}
42+
(The default is *1*): in a cluster, this attribute determines how many copies
43+
of each shard are kept on different DB-Servers. The value 1 means that only one
44+
copy (no synchronous replication) is kept. A value of k means that k-1 replicas
45+
are kept. It can also be the string `"satellite"` for a SatelliteCollection,
46+
where the replication factor is matched to the number of DB-Servers
47+
(Enterprise Edition only).
48+
49+
Any two copies reside on different DB-Servers. Replication between them is
50+
synchronous, that is, every write operation to the "leader" copy will be replicated
51+
to all "follower" replicas, before the write operation is reported successful.
52+
53+
If a server fails, this is detected automatically and one of the servers holding
54+
copies take over, usually without an error being reported.
55+
56+
@RESTBODYPARAM{writeConcern,integer,optional,int64}
57+
Write concern for this collection (default: 1).
58+
It determines how many copies of each shard are required to be
59+
in sync on the different DB-Servers. If there are less then these many copies
60+
in the cluster a shard will refuse to write. Writes to shards with enough
61+
up-to-date copies will succeed at the same time however. The value of
62+
*writeConcern* can not be larger than *replicationFactor*. _(cluster only)_
6363

6464
@RESTRETURNCODES
6565

0 commit comments

Comments
 (0)
0