我正在尝试为我的集合添加一个唯一的索引。我正在编写代码:
conn = Connection()
db = conn['textBook']
db['Users'].ensureHashIndex('word', unique = True);(存在数据库“textBook”和集合“用户”。)
pyArango.theExceptions.CreationError:坏参数。错误:{u‘’errorMessage‘:U’坏参数‘,u’‘errorNum’:10,u‘’code‘:400,u'error':True}
在函数_create (CreationError(data‘’errorMessage,data)中创建索引时出现的
哪些参数不正确?
发布于 2016-06-02 14:21:43
您需要在列表中提供字段,因此尝试如下:
db['Users'].ensureHashIndex(['word'], unique = True)https://stackoverflow.com/questions/37203879
复制相似问题