Hello,
I am observing inexplicable behavior and looking to reconcile that with my understanding of norms and nested types. I am using ES 5.6 as of now and not sure if this can be observed in more recent versions.
I have 2 mappings as shown below
Mapping 1 uses copy_to to copy data from 1 object into another object which has a text multifield:
"field1": {
"properties": {
"subfield1": {
"type": "keyword",
"index": false,
"doc_values": false,
"store": false,
"copy_to": ["field2.subfield2"]
}
}
}
"field2": {
"properties": {
"subfield2": {
"type": "keyword",
"index": false,
"doc_values": false,
"store": false,
"fields": {
"textmultifield": {
"type": "text",
"index_options": "offsets",
"norms": true,
"store": false
}
}
}
}
}
Mapping 2 is similar except the the src object is of nested type:
"nestedfield": {
"type": "nested",
"properties": {
"subfield": {
"type": "keyword",
"index": false,
"doc_values": false,
"store": false,
"copy_to": ["objectfield.subfield2"]
}
}
}
"objectfield": {
"properties": {
"subfield2": {
"type": "keyword",
"index": false,
"doc_values": false,
"store": false,
"fields": {
"textmultifield": {
"type": "text",
"index_options": "offsets",
"norms": true,
"store": false
}
}
}
}
}
"_all" field is disabled completely and "_source" is enabled for both mappings
Since the norms is enabled only on the textmultifield and norms are disabled by default if the field is not indexed, I assumed that the norms would be the same for both mappings given the same dataset but in reality the disk usage of norms in the 2nd case is higher by a magnitude or more. I verified that the norms take a lot of space in the 2nd case by analyzing the disk storage utilized by the underlying index files.
Can anyone help me in understanding the discrepancies between the 2 cases? It seems like there is an underlying detail about nested types that has been documented.
Thanks in advance.