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]という名前の1つのグループに追加できますか? –
はい、できますが、質問に投稿した元のコードになります。検索応答の 'fields'戻り値に階層構造がない場合、それらにサブフィールドを追加することはできません(例:" rate "、" description "...)。 –
ありがとうmayya :) –