Browse Source

Reset stats: lastDocSize, totalSize in batch's Reset()

abhinavdangeti 4 months ago
parent
commit
dca226594c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      index.go

+ 2 - 0
index.go

@@ -117,6 +117,8 @@ func (b *Batch) String() string {
 // be re-used in the future.
 func (b *Batch) Reset() {
 	b.internal.Reset()
+	b.lastDocSize = 0
+	b.totalSize = 0
 }
 
 func (b *Batch) Merge(o *Batch) {