mirror of https://gitee.com/bigwinds/arangodb
Fix missing changelog and docs entries (#2837)
* Adding missing changelog entries * Modified changelog * Add index deduplication option HTTP docs * added info about ARANGODB_DEFAULT_ROOT_PASSWORD * Revert "added info about ARANGODB_DEFAULT_ROOT_PASSWORD" This reverts commit 3f0241f90c4e3f59c58edda5a1f6019debae9735.
This commit is contained in:
parent
a401fd72f0
commit
59f75c1c3f
12
CHANGELOG
12
CHANGELOG
|
@ -14,8 +14,20 @@ devel
|
||||||
|
|
||||||
* documentation and js fixes for secondaries
|
* documentation and js fixes for secondaries
|
||||||
|
|
||||||
|
* RocksDB storage format was changed, users of the previous beta/alpha versions
|
||||||
|
must delete the database directory and re-import their data
|
||||||
|
|
||||||
* enabled permissions on database and collection level
|
* enabled permissions on database and collection level
|
||||||
|
|
||||||
|
* added and changed some user related REST APIs
|
||||||
|
* added `PUT /_api/user/{user}/database/{database}/{collection}` to change collection permission
|
||||||
|
* added `GET /_api/user/{user}/database/{database}/{collection}`
|
||||||
|
* added optional `full` parameter to the `GET /_api/user/{user}/database/` REST call
|
||||||
|
|
||||||
|
* added user functions in the arangoshell `@arangodb/users` module
|
||||||
|
* added `grantCollection` and `revokeCollection` functions
|
||||||
|
* added `permission(user, database, collection)` to retrieve collection specific rights
|
||||||
|
|
||||||
* added "deduplicate" attribute for array indexes, which controls whether inserting
|
* added "deduplicate" attribute for array indexes, which controls whether inserting
|
||||||
duplicate index values from the same document into a unique array index will lead to
|
duplicate index values from the same document into a unique array index will lead to
|
||||||
an error or not:
|
an error or not:
|
||||||
|
|
|
@ -1,130 +1,133 @@
|
||||||
|
|
||||||
@startDocuBlock JSF_post_api_index_hash
|
@startDocuBlock JSF_post_api_index_hash
|
||||||
@brief creates a hash index
|
@brief creates a hash index
|
||||||
|
|
||||||
@RESTHEADER{POST /_api/index#hash, Create hash index}
|
@RESTHEADER{POST /_api/index#hash, Create hash index}
|
||||||
|
|
||||||
@RESTQUERYPARAMETERS
|
@RESTQUERYPARAMETERS
|
||||||
|
|
||||||
@RESTQUERYPARAM{collection-name,string,required}
|
@RESTQUERYPARAM{collection-name,string,required}
|
||||||
The collection name.
|
The collection name.
|
||||||
|
|
||||||
@RESTBODYPARAM{type,string,required,string}
|
@RESTBODYPARAM{type,string,required,string}
|
||||||
must be equal to *"hash"*.
|
must be equal to *"hash"*.
|
||||||
|
|
||||||
@RESTBODYPARAM{fields,array,required,string}
|
@RESTBODYPARAM{fields,array,required,string}
|
||||||
an array of attribute paths.
|
an array of attribute paths.
|
||||||
|
|
||||||
@RESTBODYPARAM{unique,boolean,required,}
|
@RESTBODYPARAM{unique,boolean,required,}
|
||||||
if *true*, then create a unique index.
|
if *true*, then create a unique index.
|
||||||
|
|
||||||
@RESTBODYPARAM{sparse,boolean,required,}
|
@RESTBODYPARAM{sparse,boolean,required,}
|
||||||
if *true*, then create a sparse index.
|
if *true*, then create a sparse index.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTBODYPARAM{deduplicate,boolean,optional,boolean}
|
||||||
**NOTE** Swagger examples won't work due to the anchor.
|
if *false*, the deduplication of array values is turned off.
|
||||||
|
|
||||||
|
@RESTDESCRIPTION
|
||||||
Creates a hash index for the collection *collection-name* if it
|
**NOTE** Swagger examples won't work due to the anchor.
|
||||||
does not already exist. The call expects an object containing the index
|
|
||||||
details.
|
|
||||||
|
Creates a hash index for the collection *collection-name* if it
|
||||||
In a sparse index all documents will be excluded from the index that do not
|
does not already exist. The call expects an object containing the index
|
||||||
contain at least one of the specified index attributes (i.e. *fields*) or that
|
details.
|
||||||
have a value of *null* in any of the specified index attributes. Such documents
|
|
||||||
will not be indexed, and not be taken into account for uniqueness checks if
|
In a sparse index all documents will be excluded from the index that do not
|
||||||
the *unique* flag is set.
|
contain at least one of the specified index attributes (i.e. *fields*) or that
|
||||||
|
have a value of *null* in any of the specified index attributes. Such documents
|
||||||
In a non-sparse index, these documents will be indexed (for non-present
|
will not be indexed, and not be taken into account for uniqueness checks if
|
||||||
indexed attributes, a value of *null* will be used) and will be taken into
|
the *unique* flag is set.
|
||||||
account for uniqueness checks if the *unique* flag is set.
|
|
||||||
|
In a non-sparse index, these documents will be indexed (for non-present
|
||||||
**Note**: unique indexes on non-shard keys are not supported in a cluster.
|
indexed attributes, a value of *null* will be used) and will be taken into
|
||||||
|
account for uniqueness checks if the *unique* flag is set.
|
||||||
@RESTRETURNCODES
|
|
||||||
|
**Note**: unique indexes on non-shard keys are not supported in a cluster.
|
||||||
@RESTRETURNCODE{200}
|
|
||||||
If the index already exists, then a *HTTP 200* is returned.
|
@RESTRETURNCODES
|
||||||
|
|
||||||
@RESTRETURNCODE{201}
|
@RESTRETURNCODE{200}
|
||||||
If the index does not already exist and could be created, then a *HTTP 201*
|
If the index already exists, then a *HTTP 200* is returned.
|
||||||
is returned.
|
|
||||||
|
@RESTRETURNCODE{201}
|
||||||
@RESTRETURNCODE{400}
|
If the index does not already exist and could be created, then a *HTTP 201*
|
||||||
If the collection already contains documents and you try to create a unique
|
is returned.
|
||||||
hash index in such a way that there are documents violating the uniqueness,
|
|
||||||
then a *HTTP 400* is returned.
|
@RESTRETURNCODE{400}
|
||||||
|
If the collection already contains documents and you try to create a unique
|
||||||
@RESTRETURNCODE{404}
|
hash index in such a way that there are documents violating the uniqueness,
|
||||||
If the *collection-name* is unknown, then a *HTTP 404* is returned.
|
then a *HTTP 400* is returned.
|
||||||
|
|
||||||
@EXAMPLES
|
@RESTRETURNCODE{404}
|
||||||
|
If the *collection-name* is unknown, then a *HTTP 404* is returned.
|
||||||
Creating an unique constraint
|
|
||||||
|
@EXAMPLES
|
||||||
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewUniqueConstraint}
|
|
||||||
var cn = "products";
|
Creating an unique constraint
|
||||||
db._drop(cn);
|
|
||||||
db._create(cn);
|
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewUniqueConstraint}
|
||||||
|
var cn = "products";
|
||||||
var url = "/_api/index?collection=" + cn;
|
db._drop(cn);
|
||||||
var body = {
|
db._create(cn);
|
||||||
type: "hash",
|
|
||||||
unique: true,
|
var url = "/_api/index?collection=" + cn;
|
||||||
fields : [ "a", "b" ]
|
var body = {
|
||||||
};
|
type: "hash",
|
||||||
|
unique: true,
|
||||||
var response = logCurlRequest('POST', url, body);
|
fields : [ "a", "b" ]
|
||||||
|
};
|
||||||
assert(response.code === 201);
|
|
||||||
|
var response = logCurlRequest('POST', url, body);
|
||||||
logJsonResponse(response);
|
|
||||||
~ db._drop(cn);
|
assert(response.code === 201);
|
||||||
@END_EXAMPLE_ARANGOSH_RUN
|
|
||||||
|
logJsonResponse(response);
|
||||||
Creating a non-unique hash index
|
~ db._drop(cn);
|
||||||
|
@END_EXAMPLE_ARANGOSH_RUN
|
||||||
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewHashIndex}
|
|
||||||
var cn = "products";
|
Creating a non-unique hash index
|
||||||
db._drop(cn);
|
|
||||||
db._create(cn);
|
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewHashIndex}
|
||||||
|
var cn = "products";
|
||||||
var url = "/_api/index?collection=" + cn;
|
db._drop(cn);
|
||||||
var body = {
|
db._create(cn);
|
||||||
type: "hash",
|
|
||||||
unique: false,
|
var url = "/_api/index?collection=" + cn;
|
||||||
fields: [ "a", "b" ]
|
var body = {
|
||||||
};
|
type: "hash",
|
||||||
|
unique: false,
|
||||||
var response = logCurlRequest('POST', url, body);
|
fields: [ "a", "b" ]
|
||||||
|
};
|
||||||
assert(response.code === 201);
|
|
||||||
|
var response = logCurlRequest('POST', url, body);
|
||||||
logJsonResponse(response);
|
|
||||||
~ db._drop(cn);
|
assert(response.code === 201);
|
||||||
@END_EXAMPLE_ARANGOSH_RUN
|
|
||||||
|
logJsonResponse(response);
|
||||||
Creating a sparse index
|
~ db._drop(cn);
|
||||||
|
@END_EXAMPLE_ARANGOSH_RUN
|
||||||
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateSparseHashIndex}
|
|
||||||
var cn = "products";
|
Creating a sparse index
|
||||||
db._drop(cn);
|
|
||||||
db._create(cn);
|
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateSparseHashIndex}
|
||||||
|
var cn = "products";
|
||||||
var url = "/_api/index?collection=" + cn;
|
db._drop(cn);
|
||||||
var body = {
|
db._create(cn);
|
||||||
type: "hash",
|
|
||||||
unique: false,
|
var url = "/_api/index?collection=" + cn;
|
||||||
sparse: true,
|
var body = {
|
||||||
fields: [ "a" ]
|
type: "hash",
|
||||||
};
|
unique: false,
|
||||||
|
sparse: true,
|
||||||
var response = logCurlRequest('POST', url, body);
|
fields: [ "a" ]
|
||||||
|
};
|
||||||
assert(response.code === 201);
|
|
||||||
|
var response = logCurlRequest('POST', url, body);
|
||||||
logJsonResponse(response);
|
|
||||||
~ db._drop(cn);
|
assert(response.code === 201);
|
||||||
@END_EXAMPLE_ARANGOSH_RUN
|
|
||||||
@endDocuBlock
|
logJsonResponse(response);
|
||||||
|
~ db._drop(cn);
|
||||||
|
@END_EXAMPLE_ARANGOSH_RUN
|
||||||
|
@endDocuBlock
|
||||||
|
|
||||||
|
|
|
@ -1,107 +1,110 @@
|
||||||
|
|
||||||
@startDocuBlock JSF_post_api_index_skiplist
|
@startDocuBlock JSF_post_api_index_skiplist
|
||||||
@brief creates a skip-list
|
@brief creates a skip-list
|
||||||
|
|
||||||
@RESTHEADER{POST /_api/index#skiplist, Create skip list}
|
@RESTHEADER{POST /_api/index#skiplist, Create skip list}
|
||||||
|
|
||||||
@RESTQUERYPARAMETERS
|
@RESTQUERYPARAMETERS
|
||||||
|
|
||||||
@RESTQUERYPARAM{collection-name,string,required}
|
@RESTQUERYPARAM{collection-name,string,required}
|
||||||
The collection name.
|
The collection name.
|
||||||
|
|
||||||
@RESTBODYPARAM{type,string,required,string}
|
@RESTBODYPARAM{type,string,required,string}
|
||||||
must be equal to *"skiplist"*.
|
must be equal to *"skiplist"*.
|
||||||
|
|
||||||
@RESTBODYPARAM{fields,array,required,string}
|
@RESTBODYPARAM{fields,array,required,string}
|
||||||
an array of attribute paths.
|
an array of attribute paths.
|
||||||
|
|
||||||
@RESTBODYPARAM{unique,boolean,required,}
|
@RESTBODYPARAM{unique,boolean,required,}
|
||||||
if *true*, then create a unique index.
|
if *true*, then create a unique index.
|
||||||
|
|
||||||
@RESTBODYPARAM{sparse,boolean,required,}
|
@RESTBODYPARAM{sparse,boolean,required,}
|
||||||
if *true*, then create a sparse index.
|
if *true*, then create a sparse index.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTBODYPARAM{deduplicate,boolean,optional,boolean}
|
||||||
|
if *false*, the deduplication of array values is turned off.
|
||||||
Creates a skip-list index for the collection *collection-name*, if
|
|
||||||
it does not already exist. The call expects an object containing the index
|
@RESTDESCRIPTION
|
||||||
details.
|
|
||||||
|
Creates a skip-list index for the collection *collection-name*, if
|
||||||
In a sparse index all documents will be excluded from the index that do not
|
it does not already exist. The call expects an object containing the index
|
||||||
contain at least one of the specified index attributes (i.e. *fields*) or that
|
details.
|
||||||
have a value of *null* in any of the specified index attributes. Such documents
|
|
||||||
will not be indexed, and not be taken into account for uniqueness checks if
|
In a sparse index all documents will be excluded from the index that do not
|
||||||
the *unique* flag is set.
|
contain at least one of the specified index attributes (i.e. *fields*) or that
|
||||||
|
have a value of *null* in any of the specified index attributes. Such documents
|
||||||
In a non-sparse index, these documents will be indexed (for non-present
|
will not be indexed, and not be taken into account for uniqueness checks if
|
||||||
indexed attributes, a value of *null* will be used) and will be taken into
|
the *unique* flag is set.
|
||||||
account for uniqueness checks if the *unique* flag is set.
|
|
||||||
|
In a non-sparse index, these documents will be indexed (for non-present
|
||||||
**Note**: unique indexes on non-shard keys are not supported in a cluster.
|
indexed attributes, a value of *null* will be used) and will be taken into
|
||||||
|
account for uniqueness checks if the *unique* flag is set.
|
||||||
@RESTRETURNCODES
|
|
||||||
|
**Note**: unique indexes on non-shard keys are not supported in a cluster.
|
||||||
@RESTRETURNCODE{200}
|
|
||||||
If the index already exists, then a *HTTP 200* is
|
@RESTRETURNCODES
|
||||||
returned.
|
|
||||||
|
@RESTRETURNCODE{200}
|
||||||
@RESTRETURNCODE{201}
|
If the index already exists, then a *HTTP 200* is
|
||||||
If the index does not already exist and could be created, then a *HTTP 201*
|
returned.
|
||||||
is returned.
|
|
||||||
|
@RESTRETURNCODE{201}
|
||||||
@RESTRETURNCODE{400}
|
If the index does not already exist and could be created, then a *HTTP 201*
|
||||||
If the collection already contains documents and you try to create a unique
|
is returned.
|
||||||
skip-list index in such a way that there are documents violating the
|
|
||||||
uniqueness, then a *HTTP 400* is returned.
|
@RESTRETURNCODE{400}
|
||||||
|
If the collection already contains documents and you try to create a unique
|
||||||
@RESTRETURNCODE{404}
|
skip-list index in such a way that there are documents violating the
|
||||||
If the *collection-name* is unknown, then a *HTTP 404* is returned.
|
uniqueness, then a *HTTP 400* is returned.
|
||||||
|
|
||||||
@EXAMPLES
|
@RESTRETURNCODE{404}
|
||||||
|
If the *collection-name* is unknown, then a *HTTP 404* is returned.
|
||||||
Creating a skiplist index
|
|
||||||
|
@EXAMPLES
|
||||||
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewSkiplist}
|
|
||||||
var cn = "products";
|
Creating a skiplist index
|
||||||
db._drop(cn);
|
|
||||||
db._create(cn);
|
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateNewSkiplist}
|
||||||
|
var cn = "products";
|
||||||
var url = "/_api/index?collection=" + cn;
|
db._drop(cn);
|
||||||
var body = {
|
db._create(cn);
|
||||||
type: "skiplist",
|
|
||||||
unique: false,
|
var url = "/_api/index?collection=" + cn;
|
||||||
fields: [ "a", "b" ]
|
var body = {
|
||||||
};
|
type: "skiplist",
|
||||||
|
unique: false,
|
||||||
var response = logCurlRequest('POST', url, body);
|
fields: [ "a", "b" ]
|
||||||
|
};
|
||||||
assert(response.code === 201);
|
|
||||||
|
var response = logCurlRequest('POST', url, body);
|
||||||
logJsonResponse(response);
|
|
||||||
~ db._drop(cn);
|
assert(response.code === 201);
|
||||||
@END_EXAMPLE_ARANGOSH_RUN
|
|
||||||
|
logJsonResponse(response);
|
||||||
Creating a sparse skiplist index
|
~ db._drop(cn);
|
||||||
|
@END_EXAMPLE_ARANGOSH_RUN
|
||||||
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateSparseSkiplist}
|
|
||||||
var cn = "products";
|
Creating a sparse skiplist index
|
||||||
db._drop(cn);
|
|
||||||
db._create(cn);
|
@EXAMPLE_ARANGOSH_RUN{RestIndexCreateSparseSkiplist}
|
||||||
|
var cn = "products";
|
||||||
var url = "/_api/index?collection=" + cn;
|
db._drop(cn);
|
||||||
var body = {
|
db._create(cn);
|
||||||
type: "skiplist",
|
|
||||||
unique: false,
|
var url = "/_api/index?collection=" + cn;
|
||||||
sparse: true,
|
var body = {
|
||||||
fields: [ "a" ]
|
type: "skiplist",
|
||||||
};
|
unique: false,
|
||||||
|
sparse: true,
|
||||||
var response = logCurlRequest('POST', url, body);
|
fields: [ "a" ]
|
||||||
|
};
|
||||||
assert(response.code === 201);
|
|
||||||
|
var response = logCurlRequest('POST', url, body);
|
||||||
logJsonResponse(response);
|
|
||||||
~ db._drop(cn);
|
assert(response.code === 201);
|
||||||
@END_EXAMPLE_ARANGOSH_RUN
|
|
||||||
@endDocuBlock
|
logJsonResponse(response);
|
||||||
|
~ db._drop(cn);
|
||||||
|
@END_EXAMPLE_ARANGOSH_RUN
|
||||||
|
@endDocuBlock
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue