ArangoIndexes

avokka.arangodb.ArangoIndexes
See theArangoIndexes companion object
trait ArangoIndexes[F[_]]

Arango indexes API

Type parameters

F

effect

Attributes

See also
Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def createFullText(fields: List[String], minLength: Option[Int], name: Option[String]): F[ArangoResponse[Index]]

Creates a fulltext index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

Creates a fulltext index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

Value parameters

fields

an array of attribute names. Currently, the array is limited to exactly one attribute

minLength

Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.

Attributes

def createGeo(fields: List[String], geoJson: Boolean, name: Option[String]): F[ArangoResponse[Index]]

Creates a geo-spatial index in the collection collection-name, if it does not already exist. Expects an object containing the index details.

Creates a geo-spatial index in the collection collection-name, if it does not already exist. Expects an object containing the index details.

Geo indexes are always sparse, meaning that documents that do not contain the index attributes or have non-numeric values in the index attributes will not be indexed.

Value parameters

fields

An array with one or two attribute paths. If it is an array with one attribute path location, then a geo-spatial index on all documents is created using location as path to the coordinates. The value of the attribute must be an array with at least two double values. The array must contain the latitude (first value) and the longitude (second value). All documents, which do not have the attribute path or with value that are not suitable, are ignored. If it is an array with two attribute paths latitude and longitude, then a geo-spatial index on all documents is created using latitude and longitude as paths the latitude and the longitude. The value of the attribute latitude and of the attribute longitude must a double. All documents, which do not have the attribute paths or which values are not suitable, are ignored.

geoJson

If a geo-spatial index on a location is constructed and geoJson is true, then the order within the array is longitude followed by latitude. This corresponds to the format described in http://geojson.org/geojson-spec.html#positions

Attributes

def createHash(fields: List[String], unique: Boolean, sparse: Boolean, deduplicate: Boolean, name: Option[String]): F[ArangoResponse[Index]]

Creates a hash index for the collection collection-name if it does not already exist. The call expects an object containing the index details.

Creates a hash index for the collection collection-name if it does not already exist. The call expects an object containing the index details.

In a sparse index all documents will be excluded from the index that do not 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 will not be indexed, and not be taken into account for uniqueness checks if the unique flag is set.

In a non-sparse index, these documents will be indexed (for non-present indexed attributes, a value of null will be used) and will be taken into account for uniqueness checks if the unique flag is set.

Note: unique indexes on non-shard keys are not supported in a cluster.

Value parameters

deduplicate

if false, the deduplication of array values is turned off

fields

an array of attribute paths

sparse

if true, then create a sparse index

unique

if true, then create a unique index

Attributes

def createPersistent(fields: List[String], unique: Boolean, sparse: Boolean, name: Option[String]): F[ArangoResponse[Index]]

Creates a persistent index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

Creates a persistent index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

In a sparse index all documents will be excluded from the index that do not 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 will not be indexed, and not be taken into account for uniqueness checks if the unique flag is set.

In a non-sparse index, these documents will be indexed (for non-present indexed attributes, a value of null will be used) and will be taken into account for uniqueness checks if the unique flag is set.

Note: unique indexes on non-shard keys are not supported in a cluster.

Value parameters

fields

an array of attribute paths

sparse

if true, then create a sparse index

unique

if true, then create a unique index

Attributes

def createSkipList(fields: List[String], unique: Boolean, sparse: Boolean, deduplicate: Boolean, name: Option[String]): F[ArangoResponse[Index]]

Creates a skip-list index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

Creates a skip-list index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

In a sparse index all documents will be excluded from the index that do not 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 will not be indexed, and not be taken into account for uniqueness checks if the unique flag is set.

In a non-sparse index, these documents will be indexed (for non-present indexed attributes, a value of null will be used) and will be taken into account for uniqueness checks if the unique flag is set.

Note: unique indexes on non-shard keys are not supported in a cluster.

Value parameters

deduplicate

if false, the deduplication of array values is turned off

fields

an array of attribute paths

sparse

if true, then create a sparse index

unique

if true, then create a unique index

Attributes

def createTtl(fields: List[String], expireAfter: Int, name: Option[String]): F[ArangoResponse[Index]]

Creates a TTL index for the collection collection-name if it does not already exist. The call expects an object containing the index details.

Creates a TTL index for the collection collection-name if it does not already exist. The call expects an object containing the index details.

Value parameters

expireAfter

The time (in seconds) after a document’s creation after which the documents count as “expired”.

fields

an array with exactly one attribute path

Attributes

Returns an object with an attribute indexes containing an array of all index descriptions for the given collection. The same information is also available in the identifiers as an object with the index handles as keys.

Returns an object with an attribute indexes containing an array of all index descriptions for the given collection. The same information is also available in the identifiers as an object with the index handles as keys.

Attributes

Returns

all indexes of a collection