只返回河南省25岁和河北省26岁的
SQL语句
select * from tableName where
(province = '河南' and age = 25)
or (province = '河北' and age = 26)
ES语句
{
"from": 0,
"size": 10,
"query": {
"bool": {
"filter": [
{
"bool": {
"should": [
{
"bool": {
"must": [
{
"term": {
"province": {
"value": "河南",
"boost": 1.0
}
}
},
{
"term": {
"age": {
"value": 25,
"boost": 1.0
}
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
},
{
"bool": {
"must": [
{
"term": {
"province": {
"value": "河北",
"boost": 1.0
}
}
},
{
"term": {
"age": {
"value": 26,
"boost": 1.0
}
}
}
],
"adjust_pure_negative": true,
"boost":

最低0.47元/天 解锁文章
561

被折叠的 条评论
为什么被折叠?



