【发布时间】:2015-10-17 03:54:10
【问题描述】:
我是 OData 服务的新手。我编写了一个查询来检索具有空值的特定字段。我在 OData 中构建查询并将其传递给弹性搜索以检索数据。但查询似乎不起作用。
The query is as follows:
$filter=assignedToEM eq null.
I have also tried giving as: $filter=assignedToEM eq 'null'
The query has been built as :
{
"from" : 0,
"size" : 15,
"query":{
"bool" : {
"must_not" : {
"term" : {
"assignedToEM" : "null"
}
}
}
}
}
In elastic search schema,The not_null value for assignedToEM is given as "_null_".
It would be really helpful if i get a solution for this as soon as possible.
Thanks.
【问题讨论】:
-
因为没有找到接受答案。我认为查询将是 $filter=assignedToEM eq null 并且您可以使用缺少字段 elastic.co/guide/en/elasticsearch/reference/1.4/… 构建 ES 查询
标签: elasticsearch odata