Hello, everyone
Here is my search request and response, I filter oceanchannelid to empty value, but I still get oceanchannelid with empty value.
{
"bool" : {
"must_not" : [
{
"term" : {
"oceanchannelid" : {
"value" : "",
"boost" : 1.0,
"case_insensitive" : true
}
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
"hits": [
{
"_index": "20240522",
"_id": "acc73ed550bc489987b6c937df5ffa60",
"_score": 8.986232,
"_source": {
"stime": "2024-05-22 11:42:04",
"timestamp": "2024-05-22 11:42:01",
"oceanchannelid": "",
"os": "windows"
}
}
]
If I remove the case_insensitive setting, it works.
{
"bool" : {
"must_not" : [
{
"term" : {
"oceanchannelid" : {
"value" : "",
"boost" : 1.0
}
}
}
],
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
The type of oceanchannelid is keyword.
"oceanchannelid": {
"type": "keyword",
"store": true
},
So if I want to filter empty string, I cannot set case_insensitive to true?