couchdb - 如何设置多个索引
问题描述
我想设置多个索引。与下面的示例相同,我通过划分属性设置了多个索引,但它不是有效的 json。请让我知道如何正确设置多个索引。
此链接上的示例。 https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html
{
"index":{
"fields":["owner"] // Names of the fields to be queried
},
"ddoc":"index1Doc", // (optional) Name of the design document inwhich the index will be created.
"name":"index1",
"type":"json"
}
{
"index":{
"fields":["owner", "color"] // Names of the fields to be queried
},
"ddoc":"index2Doc", // (optional) Name of the design document inwhich the index will be created.
"name":"index2",
"type":"json"
}
{
"index":{
"fields":["owner", "color", "size"] // Names of the fields to bequeried
},
"ddoc":"index3Doc", // (optional) Name of the design document inwhich the index will be created.
"name":"index3",
"type":"json"
}
解决方案
推荐阅读
- javascript - 创建嵌套对象
- c# - 取消请求到所有任务的传播时间(TPL)
- javascript - JavaScript:调用外部函数时调用Array.reduce,并且外部函数有参数
- python - 管道输入到 ipython
- python - Python列表不添加,只替换
- ios - 不在活动视图控制器上时如何在“幕后”执行转场?
- java - 无法在编译错误的主方法中引用我的方法
- android - firebase - kotlin - Hashmap 类型推断失败
- python - 如何使用 python 在 Sqlite 数据库中存储带有混合引号的字符串?
- php - 如何按天对数据库表数据进行分组并创建带有 html 表的日历?