Yash Pandya
Yash Pandya

Reputation: 3

Can we add an extra index on _key column in arangodb

I have a requirement which requires to do range search on _key column. But in one of the blog of arangodb, they have mentioned that _key column can not be used for range queries and sort operations. So in this case what can we do? Can we add skiplist index on _key column?

Upvotes: 0

Views: 77

Answers (1)

Kaveh Vahedipour
Kaveh Vahedipour

Reputation: 3477

You cannot use the _key attribute for searching ranges in the current version of ArangoDB (3.4.x). The primary index is not considered as sorted, even though in RocksDB the index is sorted. This will change in v3.5.0 (it is already implemented in the devel branch).

Adding a skiplist index to the collection over the _key attribute will have no effect.

The only way of managing indexed ranges in your collections is by holding a separate field, which is indexed accordingly to allow for range searches.

Upvotes: 2

Related Questions