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 :) –