32 should better be replaced by "symbolFactor" (#9203)

Signed-off-by: tanghengjian <1040104807@qq.com>
This commit is contained in:
Jupiter 2021-08-13 19:08:53 +08:00 committed by GitHub
parent 84e786ebc1
commit 84ab705318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1180,7 +1180,7 @@ func newReader(b ByteSlice, c io.Closer) (*Reader, error) {
lastKey = nil
valueCount = 0
}
if valueCount%32 == 0 {
if valueCount%symbolFactor == 0 {
r.postings[key[0]] = append(r.postings[key[0]], postingOffset{value: key[1], off: off})
lastKey = nil
} else {
@ -1335,7 +1335,7 @@ func (s Symbols) ReverseLookup(sym string) (uint32, error) {
i--
}
d.Skip(s.offsets[i])
res := i * 32
res := i * symbolFactor
var lastLen int
var lastSymbol string
for d.Err() == nil && res <= s.seen {