doc_values
按列存储,按docId排序,在query阶段使用,直接根据docId获取具体field的value,用来排序,聚合等。html
stored field
按文档存储,按docId排序,一条文档全部的stored field都存在一块儿,在fetch阶段使用。apache
https://www.elastic.co/guide/en/elasticsearch/guide/master/docvalues.html
http://lucene.apache.org/core/8_3_0/core/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.htmlelasticsearch