0
我有一个数据表如下:Cloudant搜索索引
[
{
"payment_id": 1,
"provider_id": "ABC123 ",
"status": "pending",
"item_service": [
{
"code": "NY100",
"provider_type":"Medical_Center",
"description": "Initial Consultation - History, examination and treatment",
"rate": "20"
},
{
"code": "NY101",
"provider_type":"Medical_Center",
"description": "Brief Consultation - Selective review, examination and treatment",
"rate": "25"
},
{
"code": "NY102",
"provider_type":"Medical_Center",
"description": "Standard Consultation - History, examination and treatment",
"rate": "30"
}
]
}
]
和搜索索引功能
请给我您的想法是如何分割数据并在结果中的每个值上显示键名。例如:
"code": "PY102",
"provider_type":"Medical_Center",
"description": "Standard Consultation - History, examination and treatment",
"rate": "30"
感谢您的回复,我们可以将:rate,description,code和provider_type添加到名为item_service [i]的组中。 –
是的,您可以 - 但它会成为您在问题中发布的原始代码。在搜索响应中返回的“fields”没有层次结构,您不能为其添加子字段(例如“rate”,“description”...)。 –
非常感谢你mayya :) –