Skip to content

Commit 16404c3

Browse files
committed
Fix lint
1 parent ca23789 commit 16404c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/indexer/bleve/batch.go

+3
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ func NewFlushingBatch(index bleve.Index, maxBatchSize int) *FlushingBatch {
2727
}
2828
}
2929

30+
// Index add a new index to batch
3031
func (b *FlushingBatch) Index(id string, data interface{}) error {
3132
if err := b.batch.Index(id, data); err != nil {
3233
return err
3334
}
3435
return b.flushIfFull()
3536
}
3637

38+
// Delete add a delete index to batch
3739
func (b *FlushingBatch) Delete(id string) error {
3840
b.batch.Delete(id)
3941
return b.flushIfFull()
@@ -46,6 +48,7 @@ func (b *FlushingBatch) flushIfFull() error {
4648
return b.Flush()
4749
}
4850

51+
// Flush submit the batch and create a new one
4952
func (b *FlushingBatch) Flush() error {
5053
err := b.index.Batch(b.batch)
5154
if err != nil {

0 commit comments

Comments
 (0)