无论才能、知识多么卓著,如果缺乏热情,则无异纸上画饼充饥,无补于事。

请问空要怎么搜索呢?

Elasticsearch | 作者 Yu Tao | 发布于2018年07月10日 | 阅读数:1414

我用的是 es6.2.3. 最近在整理数据,发现我们的字段里面有一些是 空,不是NULL. 
json里面是:
{
    "d_id":""
    "name": "李四"
}
 
然后我想查询出来,所有d_id=""的数据,请问这种dsl怎么写呢?
 
我用的is null 和missing 都查询不出来。。。
 
谢谢大家
已邀请:

heeexy

赞同来自:

 
{
"size": 10,
"query": {
"bool": {
"filter": [
{
"term": {
"d_id": ""
}
}
]
}
}
}

要回复问题请先登录注册