mirror of https://gitee.com/bigwinds/arangodb
79 lines
2.1 KiB
Markdown
79 lines
2.1 KiB
Markdown
Handling Indexes {#HandlingIndexes}
|
|
===================================
|
|
|
|
@NAVIGATE_HandlingIndexes
|
|
@EMBEDTOC{HandlingIndexesTOC}
|
|
|
|
Indexes, Identifiers, Handles {#HandlingIndexesIntro}
|
|
=====================================================
|
|
|
|
This is an introduction to ArangoDB's interface for indexs in general. There
|
|
are special sections for
|
|
|
|
- @ref IndexCap "cap constraints",
|
|
- @ref IndexGeo "geo-spatial indexes",
|
|
- @ref IndexHash "hash indexes",
|
|
- and @ref IndexSkiplist "skip-lists".
|
|
|
|
@copydoc GlossaryIndex
|
|
|
|
@copydoc GlossaryIndexHandle
|
|
|
|
@copydoc GlossaryIndexGeo
|
|
|
|
@copydoc GlossaryIndexHash
|
|
|
|
@copydoc GlossaryIndexEdge
|
|
|
|
@copydoc GlossaryIndexSkiplist
|
|
|
|
@copydoc GlossaryIndexFulltext
|
|
|
|
Address and ETag of an Index {#HandlingIndexesResource}
|
|
=======================================================
|
|
|
|
All indexs in ArangoDB have an index handle. This handle uniquely defines an
|
|
index and is managed by ArangoDB. The interface allows you to access the indexs
|
|
of a collection as:
|
|
|
|
db.@FA{collection}.index(@FA{index-handle})
|
|
|
|
For example: Assume that the index handle, which is stored in the `_id`
|
|
attribute of the index, is `demo/362549736` and the index lives in a collection
|
|
named @FA{demo}, then that index can be accessed as:
|
|
|
|
db.demo.index("demo/362549736")
|
|
|
|
Because the index handle is unique within the database, you can leave out the
|
|
@FA{collection} and use the shortcut:
|
|
|
|
db._index("demo/362549736")
|
|
|
|
Working with Indexes {#HandlingIndexesShell}
|
|
============================================
|
|
|
|
Collection Methods {#HandlingIndexesCollectionMethods}
|
|
------------------------------------------------------
|
|
|
|
@anchor HandlingIndexesRead
|
|
@copydetails JSF_ArangoCollection_prototype_index
|
|
|
|
@CLEARPAGE
|
|
@anchor HandlingIndexesReadAll
|
|
@copydetails JS_GetIndexesVocbaseCol
|
|
|
|
@CLEARPAGE
|
|
@anchor HandlingIndexesDelete
|
|
@copydetails JS_DropIndexVocbaseCol
|
|
|
|
@CLEARPAGE
|
|
Database Methods {#HandlingIndexesDatabaseMethods}
|
|
--------------------------------------------------
|
|
|
|
@anchor HandlingIndexesDbRead
|
|
@copydetails JSF_ArangoDatabase_prototype__index
|
|
|
|
@CLEARPAGE
|
|
@anchor HandlingIndexesDbDelete
|
|
@copydetails JSF_ArangoDatabase_prototype__dropIndex
|