0
0
Fork 0

scorch zap Posting doesn't use iterator field

This commit is contained in:
Steve Yen 2018-03-05 16:33:13 -08:00
parent 16174c589d
commit 502e64c256
1 changed files with 4 additions and 7 deletions

View File

@ -337,7 +337,6 @@ func (i *PostingsIterator) Next() (segment.Posting, error) {
reuseLocs := i.next.locs // hold for reuse before struct clearing reuseLocs := i.next.locs // hold for reuse before struct clearing
i.next = Posting{} // clear the struct i.next = Posting{} // clear the struct
rv := &i.next rv := &i.next
rv.iterator = i
rv.docNum = uint64(n) rv.docNum = uint64(n)
var err error var err error
@ -373,12 +372,10 @@ func (i *PostingsIterator) Next() (segment.Posting, error) {
// Posting is a single entry in a postings list // Posting is a single entry in a postings list
type Posting struct { type Posting struct {
iterator *PostingsIterator docNum uint64
docNum uint64 freq uint64
norm float32
freq uint64 locs []segment.Location
norm float32
locs []segment.Location
} }
// Number returns the document number of this posting in this segment // Number returns the document number of this posting in this segment