From 3d2997eb8b80792f09eb984f841c71b907894bcb Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Thu, 9 Apr 2020 12:55:32 +0200 Subject: Add FillWithMatchedRules method --- stream_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stream_handler.go') diff --git a/stream_handler.go b/stream_handler.go index 2d80f60..f2309ad 100644 --- a/stream_handler.go +++ b/stream_handler.go @@ -44,7 +44,7 @@ func NewStreamHandler(connection ConnectionHandler, streamFlow StreamFlow, scann timestamps: make([]time.Time, 0, InitialBlockCount), lossBlocks: make([]bool, 0, InitialBlockCount), documentsIDs: make([]RowID, 0, 1), // most of the time the stream fit in one document - patternMatches: make(map[uint][]PatternSlice, 10), // TODO: change with exactly value + patternMatches: make(map[uint][]PatternSlice, connection.PatternsDatabaseSize()), scanner: scanner, } @@ -127,7 +127,7 @@ func (sh *StreamHandler) resetCurrentDocument() { } } -func (sh *StreamHandler) onMatch(id uint, from uint64, to uint64, flags uint, context interface{}) error { +func (sh *StreamHandler) onMatch(id uint, from uint64, to uint64, _ uint, _ interface{}) error { patternSlices, isPresent := sh.patternMatches[id] if isPresent { if len(patternSlices) > 0 { -- cgit v1.2.3-70-g09d2