elasticsearch關聯(lián)查詢對比-創(chuàng)新互聯(lián)

兩種方式 嵌套和父子關聯(lián)

創(chuàng)新互聯(lián)從2013年創(chuàng)立,是專業(yè)互聯(lián)網技術服務公司,擁有項目做網站、成都網站建設網站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元崇左做網站,已為上家服務,為崇左各地企業(yè)和個人服務,聯(lián)系電話:028-86922220

Nested

  • Nested docs are stored in the same Lucene block as each other, which helps read/query performance. Reading a nested doc is faster than the equivalent parent/child.

  • Updating a single field in a nested document (parent or nested children) forces ES to reindex the entire nested document. This can be very expensive for large nested docs

  • "Cross referencing" nested documents is impossible

  • Best suited for data that does not change frequently

Parent/Child

  • Children are stored separately from the parent, but are routed to the same shard. So parent/children are slightly less performance on read/query than nested

  • Parent/child mappings have a bit extra memory overhead, since ES maintains a "join" list in memory

  • Updating a child doc does not affect the parent or any other children, which can potentially save a lot of indexing on large docs

  • Sorting/scoring can be difficult with Parent/Child since the Has Child/Has Parent operations can be opaque at times

綜上所述,兩種方式均有利弊,官方建議,自己處理關聯(lián)關系,減輕ES的壓力。

另外有需要云服務器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

網站標題:elasticsearch關聯(lián)查詢對比-創(chuàng)新互聯(lián)
瀏覽路徑:http://muchs.cn/article16/cdeidg.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供網站建設、品牌網站設計、網站收錄、動態(tài)網站、服務器托管、響應式網站

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

網站建設網站維護公司