create_index
在集合上创建一个索引
声明
bool create_index(int coll_handle, string coll_name, string index_name, array key_list, bool is_unique = false, mixed expire_after_seconds = nil)
参数
参数名 | 描述 |
---|---|
coll_handle | 集合句柄 |
coll_name | 集合名称 |
index_name | 索引名称 |
key_list | 索引键列表 |
is_unique | 索引类型是否为'unique' |
expire_after_seconds | 索引过期时间 |
返回值
true - 创建成功, false - 创建失败