Skip to content

Commit c8ef06b

Browse files
committed
MB:59633: Adding snappy and chunk options for indexing
1 parent 7506c0f commit c8ef06b

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

indexing_options.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const (
2222
IncludeTermVectors
2323
DocValues
2424
SkipFreqNorm
25+
SkipSnappy
26+
SkipChunking
2527
)
2628

2729
const (
@@ -59,6 +61,14 @@ func (o FieldIndexingOptions) SkipFreqNorm() bool {
5961
return o&SkipFreqNorm != 0
6062
}
6163

64+
func (o FieldIndexingOptions) SkipSnappy() bool {
65+
return o&SkipSnappy != 0
66+
}
67+
68+
func (o FieldIndexingOptions) SkipChunking() bool {
69+
return o&SkipChunking != 0
70+
}
71+
6272
func (o FieldIndexingOptions) String() string {
6373
rv := ""
6474
if o.IsIndexed() {
@@ -88,5 +98,17 @@ func (o FieldIndexingOptions) String() string {
8898
}
8999
rv += "FN"
90100
}
101+
if !o.SkipSnappy() {
102+
if rv != "" {
103+
rv += ", "
104+
}
105+
rv += "SNAPPY"
106+
}
107+
if !o.SkipChunking() {
108+
if rv != "" {
109+
rv += ", "
110+
}
111+
rv += "CHUNKING"
112+
}
91113
return rv
92114
}

0 commit comments

Comments
 (0)