第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何在搜索查詢中加入文檔

如何在搜索查詢中加入文檔

蕭十郎 2022-09-20 15:23:41
{  "took": 0,  "timed_out": false,  "_shards": {    "total": 5,    "successful": 5,    "skipped": 0,    "failed": 0  },  "hits": {    "total": 3,    "max_score": 0.2876821,    "hits": [      {        "_index": "product_index",        "_type": "product",        "_id": "1115",        "_score": 0.2876821,        "_source": {          "isactive": true,          "in_use": false,          "brand_name": "Adidas",          "sku_id": "56456487987987",          "long_description": "this is long description",          "key_feature": [            {              "id": 1148,              "key_feature": "sport wear"            },            {              "id": 1147,              "key_feature": "Cotton shirt"            },            {              "id": 1146,              "key_feature": "White and blue"            }          ],          "isdeleted": false,          "created_by": null,          "brand_id": 5,          "search_terms": [            {              "label": "white shirt",              "value": 9            }          ]          "color_id": 2,          "specific_keywords": "",          "item_list": [            {              "item_id": 1114,              "product_id": 1115,              "isactive": true,              "id": 9,              "isdeleted": false            },            {              "item_id": 1113,              "product_id": 1115,              "isactive": true,              "id": 10,              "isdeleted": false            }          ],我的要求是附加所有相關(guān)文檔,其中包含特定的鍵值字段,這些字段是根據(jù)item_id在item_list中指定的。在上面的結(jié)果中,文檔 id 1115 具有item_list其中包含item_id 1114 和 1113。因此,特定字段附在文檔 1115 中。彈性搜索中的搜索查詢應(yīng)該是什么?
查看完整描述

1 回答

?
慕碼人8056858

TA貢獻(xiàn)1803條經(jīng)驗(yàn) 獲得超6個(gè)贊

你不能加入彈性搜索,要實(shí)現(xiàn)你的目標(biāo),你可以做兩件事:

  1. 在item_id 1115中復(fù)制item_id 1114和1113的信息(當(dāng)然在所有其他文件中)。

  2. 請?jiān)趹?yīng)用程序級別加入,因此在此查詢之后,您可以提取item_id 1114 和 1113,并運(yùn)行其他兩個(gè)查詢以獲取有關(guān)此項(xiàng)的信息。然后在應(yīng)用程序級別加入所有 json。


查看完整回答
反對 回復(fù) 2022-09-20
  • 1 回答
  • 0 關(guān)注
  • 112 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)