# ES 多条件查询并 should是or, must是and, must_not排除当前的其他所有结果, sort排序, 如果需要查询子集合就是vout.address 调用属性来查询.
GET hy_ethereum_transaction_alias/_search
{"size":10,
"from":0,
"query": {
"bool": {"should": [
{ "term": { "from": "0xf06c947c002d206f404d59de768cd10ef0b25048" }},
{ "term": { "to":"0xe94b04a0fed112f3664e45adb2b8915693dd5ff3"}}
]}
},
"sort": [
{
"blockTimestamp": {
"order": "desc"
}
}
]
}
# 深层查询字段 # ES 多条件 或 查询 子集合中的字段
GET btc_new_transactions/_search
{"size":50,
"from":0,
"query": {
"bool": {"should": [
{ "term": { "vout.address": "bc1qm6j08hxp0f9cpm05e9frpql34qqdy8h3txlytn" }},
{ "term": { "vin.address":"1Fi9J5TeaWPHdU5cTJ4e9jr3V58SrWtUuT"}}
]}
},
"sort": [
{
"blocktime": {
"order": "desc"
}
}
]
}