Lucene dvd dvm文件便是docvalues文件——就是针对field value的列存储

简介:
public final class Lucene54DocValuesFormat
extends DocValuesFormat
Lucene 5.4 DocValues format.

Encodes the five per-document value types (Numeric,Binary,Sorted,SortedSet,SortedNumeric) with these strategies:

NUMERIC:

  • Delta-compressed: per-document integers written as deltas from the minimum value, compressed with bitpacking. For more information, see DirectWriter.
  • Table-compressed: when the number of unique values is very small (< 256), and when there are unused "gaps" in the range of values used (such as SmallFloat), a lookup table is written instead. Each per-document entry is instead the ordinal to this table, and those ordinals are compressed with bitpacking (DirectWriter).
  • GCD-compressed: when all numbers share a common divisor, such as dates, the greatest common denominator (GCD) is computed, and quotients are stored using Delta-compressed Numerics.
  • Monotonic-compressed: when all numbers are monotonically increasing offsets, they are written as blocks of bitpacked integers, encoding the deviation from the expected delta.
  • Const-compressed: when there is only one possible non-missing value, only the missing bitset is encoded.
  • Sparse-compressed: only documents with a value are stored, and lookups are performed using binary search.

BINARY:

  • Fixed-width Binary: one large concatenated byte[] is written, along with the fixed length. Each document's value can be addressed directly with multiplication (docID * length).
  • Variable-width Binary: one large concatenated byte[] is written, along with end addresses for each document. The addresses are written as Monotonic-compressed numerics.
  • Prefix-compressed Binary: values are written in chunks of 16, with the first value written completely and other values sharing prefixes. chunk addresses are written as Monotonic-compressed numerics. A reverse lookup index is written from a portion of every 1024th term.

SORTED:

  • Sorted: a mapping of ordinals to deduplicated terms is written as Binary, along with the per-document ordinals written using one of the numeric strategies above.

SORTED_SET:

  • Single: if all documents have 0 or 1 value, then data are written like SORTED.
  • SortedSet table: when there are few unique sets of values (< 256) then each set is assigned an id, a lookup table is written and the mapping from document to set id is written using the numeric strategies above.
  • SortedSet: a mapping of ordinals to deduplicated terms is written as Binary, an ordinal list and per-document index into this list are written using the numeric strategies above.

SORTED_NUMERIC:

  • Single: if all documents have 0 or 1 value, then data are written like NUMERIC.
  • SortedSet table: when there are few unique sets of values (< 256) then each set is assigned an id, a lookup table is written and the mapping from document to set id is written using the numeric strategies above.
  • SortedNumeric: a value list and per-document index into this list are written using the numeric strategies above.

Files:

  1. .dvd: DocValues data
  2. .dvm: DocValues metadata

转自:http://lucene.apache.org/core/6_4_2/core/org/apache/lucene/codecs/lucene54/Lucene54DocValuesFormat.html

 

可以看到占用空间非常小!!!

复制代码
du -sm elasticsearch/nodes/0/indices/hec_test2/0/index/*
299     elasticsearch/nodes/0/indices/hec_test2/0/index/_e.fdt
1       elasticsearch/nodes/0/indices/hec_test2/0/index/_e.fdx
1       elasticsearch/nodes/0/indices/hec_test2/0/index/_e.fnm
148     elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene50_0.doc
130     elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene50_0.tim
5       elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene50_0.tip
1       elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene54_0.dvd
1       elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene54_0.dvm
1       elasticsearch/nodes/0/indices/hec_test2/0/index/_e.si
1       elasticsearch/nodes/0/indices/hec_test2/0/index/segments_7
0       elasticsearch/nodes/0/indices/hec_test2/0/index/write.lock
复制代码

 














本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6669414.html,如需转载请自行联系原作者




相关实践学习
以电商场景为例搭建AI语义搜索应用
本实验旨在通过阿里云Elasticsearch结合阿里云搜索开发工作台AI模型服务,构建一个高效、精准的语义搜索系统,模拟电商场景,深入理解AI搜索技术原理并掌握其实现过程。
ElasticSearch 最新快速入门教程
本课程由千锋教育提供。全文搜索的需求非常大。而开源的解决办法Elasricsearch(Elastic)就是一个非常好的工具。目前是全文搜索引擎的首选。本系列教程由浅入深讲解了在CentOS7系统下如何搭建ElasticSearch,如何使用Kibana实现各种方式的搜索并详细分析了搜索的原理,最后讲解了在Java应用中如何集成ElasticSearch并实现搜索。 &nbsp;
相关文章
|
SQL 运维 搜索推荐
《揭秘,阿里开源自研搜索引擎Havenask的在线检索服务》
Havenask是阿里巴巴智能引擎事业部自研的开源高性能搜索引擎,深度支持了包括淘宝、天猫、菜鸟、高德、饿了么在内几乎整个阿里的搜索业务。本文针对性介绍了Havenask的在线检索服务,它具备高可用、高时效、低成本的优势,帮助企业和开发者量身定做适合业务发展的智能搜索服务。
85854 138
|
存储 自然语言处理 NoSQL
深入解析Elasticsearch的内部数据结构和机制:行存储、列存储与倒排索引之倒排索引(三)
深入解析Elasticsearch的内部数据结构和机制:行存储、列存储与倒排索引之倒排索引(三)
|
算法 数据挖掘 开发工具
以阿里云OpenSearch为例谈向量检索技术选型
本文从向量检索应用场景、常见的向量检索方法、向量检索性能优化、功能性能对比介绍了向量检索的业务应用场景和技术选型方式。
5428 3
|
存储 SQL 算法
|
存储 索引
ES中 Nested 类型的原理和使用
ES中 Nested 类型的原理和使用
|
自然语言处理 索引
Elasticsearch添加拼音搜索支持
Elasticsearch添加拼音搜索支持
442 0
|
云安全 安全 网络安全
|
4天前
|
JavaScript 安全 前端开发
Nodejs Brotli decoder 代码执行漏洞 (CVE-2026-111497)10629
Node.js发布安全更新修复Brotli解码器高危RCE漏洞(CVE-2026-111497),建议受影响版本用户立即升级。
1864 1