I have arangoDB already running with some collections filled with documents. I let arangoDB set up the _key
for each document (traditional type).
I just found out that there is another type of setting up the _key
, so called incremental type, which for me would be a high improvement of the DB as the _key
values I am getting now are too long.
I know I can modify properties for already existing collections (see ArangoDB documentation ). However when I try to modify keyOptions
(see code below) , keyOptions
remains as type "traditional"
.
curl -X PUT --data-binary @- --dump - http://localhost:8529/_db/mydb/_api/collection/companies/properties <<EOF
{
"keyOptions": {"increment": 1, "type": "autoincrement"}
}
EOF
In ArangoDB documentation they specify: Note: some other collection properties, such as type, isVolatile, numberOfShards or shardKeys cannot be changed once a collection is created .
So I understand that keyOptions
should be able to be modified.
The only attributes of a collection that you can change are waitForSync
and journalSize
. That is also what the documentation says.
The note ( Note: some other collection properties, such as type, isVolatile, numberOfShards or shardKeys cannot be changed once a collection is created. ) in the documentation is a little misleading. It only list a few examples of non modifiable attributes.
In summary: keyOptions is not be able to modify.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.