在我的索引中,我有两种类型的广告和产品,
产品 :
_index: fadel
_type: product
_id: 103|2
_version: 1
_score: 1
_source: {
code: 35569058
manufacturer: Packard Bell
tax_class_id: [ ]
visibility: 4
price: [ ]
in_stock: 1
.....
....
广告
_index: fadel
_type: ads
_id: 92
_version: 1
_score: 1
_source: {
customer_id: 2
ads_id: 92
product_id: 28
price_current: 1200.0000
is_pro_customer: 0
state: 13
qty_current: 19
}
fields: {
_parent: 28|2
}
那么如何获取产品的所有广告,以及如何将相关产品检索到广告
PS : 1 个产品可能有一个或多个广告,但一个广告与 1 个产品相关联
谢谢你