搜索结果正在快递途中

怎么 查两个字段不一致

匿名 | 发布于2020年11月05日 | 阅读数:2063

怎么 查两个字段不一致,用resful的方式例如:select * from tbl where A!=B
怎么 查两个字段不一致,用resful的方式例如:select * from tbl where A!=B
怎么 查两个字段不一致,用resful的方式例如:select * from tbl where A!=B
怎么 查两个字段不一致,用resful的方式例如:select * from tbl where A!=B
已邀请:

guoyanbiao520

赞同来自:

ES本身应该没有这语法吧,最好是在录入数据之前预处理一下,加一个字段标识其他两个字段一致或者不一致

Charele - Cisco4321

赞同来自:

{
"query": {
"script" : {
    "script" : {
       "source": "doc['name1'].value != doc['name2'].value"
   }
}
}
}

liuxg - Elastic

赞同来自:

你可以使用符合查询,你可以参考文章 https://blog.csdn.net/UbuntuTo ... 46568
 
GET twitter/_search
{
  "query": {
    "bool": {
      "must_not": [
        {
          "match": {
            "city": "北京"
          }
        }
      ]
    }
  }
}
 

要回复问题请先登录注册