From 502e64c2567c363d3cf0f2b1b542b9c1db74e973 Mon Sep 17 00:00:00 2001 From: Steve Yen Date: Mon, 5 Mar 2018 16:33:13 -0800 Subject: [PATCH] scorch zap Posting doesn't use iterator field --- index/scorch/segment/zap/posting.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/index/scorch/segment/zap/posting.go b/index/scorch/segment/zap/posting.go index ada39b43..27d90f2b 100644 --- a/index/scorch/segment/zap/posting.go +++ b/index/scorch/segment/zap/posting.go @@ -337,7 +337,6 @@ func (i *PostingsIterator) Next() (segment.Posting, error) { reuseLocs := i.next.locs // hold for reuse before struct clearing i.next = Posting{} // clear the struct rv := &i.next - rv.iterator = i rv.docNum = uint64(n) var err error @@ -373,12 +372,10 @@ func (i *PostingsIterator) Next() (segment.Posting, error) { // Posting is a single entry in a postings list type Posting struct { - iterator *PostingsIterator - docNum uint64 - - freq uint64 - norm float32 - locs []segment.Location + docNum uint64 + freq uint64 + norm float32 + locs []segment.Location } // Number returns the document number of this posting in this segment