32 should better be replaced by "symbolFactor" (#9203)
Signed-off-by: tanghengjian <1040104807@qq.com>
This commit is contained in:
parent
84e786ebc1
commit
84ab705318
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue