I have an index with dynamic mapping set to false.
PUT index_a
{
"mappings": {
"_doc": {
"dynamic": false,
"properties": {
"_doc": {
"properties": {
"id": {
"type": "keyword"
},
"date": {
"type": "keyword"
}
}
}
}
}
}
}
My document looks like following -
{
"id": "1",
"date": "2020-01-01",
"value": 1
}
I perform queries on this index, by applying filters on indexed fields and fetching the whole document -
GET index_a/_search
{
"query": {
"bool": {
"filter": [
{
"term": {
"id": "1"
}
},
{
"term": {
"date": "2020-01-01"
}
}
]
}
}
}
Should having "value" as an unmapped field bear any performance impact?
Are these fields stored as doc_values?
I noticed that earlier when I used to index this field, my query performance was better and had less load on cluster. But after disabling dynamic mapping, and making it an unmapped field the cluster metrics degraded.
The query is still fast, but with poor cluster metrics.