Paradox/toolbox/CollectionManager.php
public function createHashIndex($collection, $fields, $unique = null)
    {
        if (!is_array($fields)) {
            $fields = array($fields);
        }

        try {
            $result = $this->_toolbox->getCollectionHandler()->createHashIndex($collection, $fields, $unique);

            return $this->_toolbox->parseIdForKey($result['id']);
        } catch (\Exception $e) {
            $normalised = $this->_toolbox->normaliseDriverExceptions($e);
            throw new CollectionManagerException($normalised['message'], $normalised['code']);
        }
    }
public function createHashIndex($collection, $fields, $unique = null)
    {
        if (!is_array($fields)) {
            $fields = array($fields);
        }

        try {
            $result = $this->_toolbox->getCollectionHandler()->createHashIndex($collection, $fields, $unique);

            return $this->_toolbox->parseIdForKey($result['id']);
        } catch (\Exception $e) {
            $normalised = $this->_toolbox->normaliseDriverExceptions($e);
            throw new CollectionManagerException($normalised['message'], $normalised['code']);
        }
    }
Create a hash index on a collection.
@param  string                     $collection The name of the collection.
@param  array|string               $fields     The array of fields or a string representing 1 field.
@param  boolean                    $unique     Whether the values in the index should be unique or not.
@link http://www.arangodb.org/manuals/current/IndexHashHttp.html
@throws CollectionManagerException
@return int                        Id of the index created.