亲,只收二进制

sql中的 is null 和 is not null 在Elasticsearch的应用

Elasticsearch | 作者 chaochao6411 | 发布于2019年03月28日 | 阅读数:3865

使用dsl,发现ES不支持is null 和 is not null ,用=‘’ 和 <>'' 报错,请问如何破?想设置不能为空或者必为空
已邀请:

rochy - rochy_he

赞同来自:

使用通配符查询即可,
也可以先使用 exist Query 查询字段是否存在;在使用通配符查询
GET /_search
{
"query": {
"wildcard" : { "user" : "*" }
}
}

laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自:

建议源头出发,定义NULL https://www.elastic.co/guide/e ... .html

要回复问题请先登录注册