trade为订单主表
trade_order 为子订单
要查询根据订单子表里面的字段查询
POST /trade/_search
{
"query": {
"bool": {
"must": [{
"nested": {
"path": "orders",
"query": {
"bool": {
"must": [{
"term": {
"orders.campaign_id": "100010623"
}
}
]
}
}
}
}]
}
}
}
POST /trade/_search
{
"query": {
"match": {
"_id": "1000047734120564"
}
}
}