我在cloudant数据库中有以下内容
`{
"_id": "72b48c107bda43827bcfba8761f00cf4",
"_rev": "1-2c4246347f215ef82f4372659249c412",
"delivery_id": 321,
"purchase_item": "Paint"
}`
`{
"_id": "72b48c107bda43827bcfba8761f00cf4",
"_rev": "1-2c4246347f215ef82f4372659249c412",
"delivery_id": 528,
"purchase_item": "Glass"
}`
我有以下索引:
`function (doc) {
index("deliveryid", doc.delivery_id, {"store":true});
index("purchaseitem", doc.purchase_item, {"store":true});
}`
我想使用deliveryid进行搜索,但该值来自一个变量。例如,value = 321
如何在下面的搜索查询中使用“value”?query = "_design/app/_search/_delivery_id/?query=deliveryid"
1条答案
按热度按时间mfpqipee1#
看起来您正在构建URL字符串,因此将变量连接到查询中(注意
name:value
Lucene语法)