sql语句中过滤字段空值的写法是 select * from table where 字段 is not null
在es中过滤字段空值可以这样子写:
GET index/type/_search
{
"query": {
"bool": {
"must": {
"exists": {
"field": "字段名"
}
}
}
}
}
反之 为
{
"query": {
"bool": {
"must_not": {
"exists": {
"field": "字段名"
}
}
}
}
}



