From dbd8abc14f7c97ca0503a4fb5976ba6a95220452 Mon Sep 17 00:00:00 2001 From: Likith B Date: Tue, 23 Dec 2025 16:10:44 +0530 Subject: [PATCH 1/2] MB:59633: Adding snappy and chunk options for indexing --- indexing_options.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/indexing_options.go b/indexing_options.go index 4e92024..8650e63 100644 --- a/indexing_options.go +++ b/indexing_options.go @@ -22,6 +22,8 @@ const ( IncludeTermVectors DocValues SkipFreqNorm + SkipSnappy + SkipChunking ) const ( @@ -59,6 +61,14 @@ func (o FieldIndexingOptions) SkipFreqNorm() bool { return o&SkipFreqNorm != 0 } +func (o FieldIndexingOptions) SkipSnappy() bool { + return o&SkipSnappy != 0 +} + +func (o FieldIndexingOptions) SkipChunking() bool { + return o&SkipChunking != 0 +} + func (o FieldIndexingOptions) String() string { rv := "" if o.IsIndexed() { @@ -88,5 +98,17 @@ func (o FieldIndexingOptions) String() string { } rv += "FN" } + if !o.SkipSnappy() { + if rv != "" { + rv += ", " + } + rv += "SNAPPY" + } + if !o.SkipChunking() { + if rv != "" { + rv += ", " + } + rv += "CHUNKING" + } return rv } From fee0006223d92247b19019a97f01d93f7e7bb4d3 Mon Sep 17 00:00:00 2001 From: Rahul Rampure Date: Fri, 26 Dec 2025 09:43:56 +0530 Subject: [PATCH 2/2] add DocValueTermSeparator --- index.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.go b/index.go index 12d907e..d00152c 100644 --- a/index.go +++ b/index.go @@ -286,6 +286,9 @@ type DocIDReader interface { Close() error } +// Sentinel value used to separate terms in doc values encoding +const DocValueTermSeparator byte = 0xff + type DocValueVisitor func(field string, term []byte) type DocValueReader interface {