Hey guys, I'm just wondering why the first example works, and the second doesn't? What am I missing there? https://gist.github.com/matcouto/a8778cb21e3d8da73e79da3b8914f23a
######### This works ##########
{
"query": {
"bool": {
"must": [
{
"constant_score": {
"filter": {
"missing": {
"field": "given_name"
}
}
}
},
{
"wildcard": {
"family_name": "hen"
}
}
]
}
}
}
######### This doesn't work ##########
"query": {
"bool": {
"must": [
{
"constant_score": {
"filter": {
"missing": {
"field": "given_name"
}
}
}
},
{
"terms": {
"status": [
"Active"
]
}
}
]
}
}
Is this a good approach for combining queries and 'missing' filter? I just want to be able to search by null values while also adding new constraints
Thanks in advance