diff --git a/chunk.go b/chunk.go index 4307d0ed..a7ef1bc6 100644 --- a/chunk.go +++ b/chunk.go @@ -20,7 +20,7 @@ import ( // LegacyChunkMode was the original chunk mode (always chunk size 1024) // this mode is still used for chunking doc values. -var LegacyChunkMode uint32 = 1024 +var LegacyChunkMode uint32 = 1 // DefaultChunkMode is the most recent improvement to chunking and should // be used by default. diff --git a/section_inverted_text_index.go b/section_inverted_text_index.go index d19dc945..214039f4 100644 --- a/section_inverted_text_index.go +++ b/section_inverted_text_index.go @@ -19,6 +19,7 @@ import ( "encoding/binary" "math" "sort" + "strings" "sync/atomic" "github.com/RoaringBitmap/roaring" @@ -536,9 +537,11 @@ func (io *invertedIndexOpaque) writeDicts(w *CountHashWriter) (dictOffsets []uin } if postingsOffset > uint64(0) { - err = io.builder.Insert([]byte(term), postingsOffset) - if err != nil { - return nil, err + if !strings.HasPrefix(term, "##") { + err = io.builder.Insert([]byte(term), postingsOffset) + if err != nil { + return nil, err + } } }