Is there any advantage to short field names? By way of comparison, in MongoDB, field names are stored in each document, so having short field names can save a lot of space. Does it work the same way in OpenSearch?
Inverter index maps term to document id, so filed name’s length doesn’t matter
Stored fields is row-based, each document stores the fields names
Doc values is column-based, each field name will be stored only once
, so stored fields will consume too much disk if the length of field name is too large, it’s better to make the field names shorter.
created two new indexes and inserted the same data into both, except one using the short field names and the other using the long field names. About 2.4 million documents. Total index size ended up 380.5mb vs 387.2mb. So it made a little difference, but probably not enough to worry about. A bit under 2% for this data set.