-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bug
Description
Considering the following mapping
{
"mappings": {
"properties": {
"cycle_type": {
"type": "constant_keyword"
},
"name": {
"type": "text"
}
}
}
}
And the following bulk of documents:
{"index":{"_id":1}}
{"name":"kawasaki"}
{"index":{"_id":2}}
{"name":"1938"}
{"index":{"_id":3}}
{"name":"1924"}
there won't be any value associated with cycle_type field. But, running the following query has some unexpected results:
{
"query": {
"bool": {
"must_not": [
{
"exists": {
"field": "cycle_type"
}
}
]
}
}
}
There won't be any documents returned, whereas it should return all of them because cycle_type doesn't have a value.
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>bug