我是新的OData services.I已经写了一个查询来检索具有空值的特定字段。我在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 并且您可以构建包含缺少字段的ES查询 https://www.elastic.co/guide/en/elasticsearch/reference/1.4/query-dsl- missing-filter.html – LMK