mirror of https://gitee.com/bigwinds/arangodb
25 lines
584 B
Markdown
25 lines
584 B
Markdown
|
|
|
|
@brief drops an index
|
|
`db._dropIndex(index)`
|
|
|
|
Drops the *index*. If the index does not exist, then *false* is
|
|
returned. If the index existed and was dropped, then *true* is
|
|
returned.
|
|
|
|
`db._dropIndex(index-handle)`
|
|
|
|
Drops the index with *index-handle*.
|
|
|
|
@EXAMPLE_ARANGOSH_OUTPUT{dropIndex}
|
|
~db._create("example");
|
|
db.example.ensureIndex({ type: "skiplist", fields: [ "a", "b" ] });
|
|
var indexInfo = db.example.getIndexes();
|
|
indexInfo;
|
|
db._dropIndex(indexInfo[0])
|
|
db._dropIndex(indexInfo[1].id)
|
|
indexInfo = db.example.getIndexes();
|
|
~db._drop("example");
|
|
@END_EXAMPLE_ARANGOSH_OUTPUT
|
|
|