diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-09-07 09:58:18 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-09-18 14:34:46 +0900 |
commit | 2fc7c18747250ebf8adf68d2057ec22af6976f29 (patch) | |
tree | aab013c4492a82dd613866a35b98fc9de42f533d /src/core.go | |
parent | 8ef2420677abf5cca27b47bead6e70e42220c7aa (diff) |
Revise ranking algorithm
Diffstat (limited to 'src/core.go')
-rw-r--r-- | src/core.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core.go b/src/core.go index 70f2da51..e707ad5f 100644 --- a/src/core.go +++ b/src/core.go @@ -143,8 +143,8 @@ func Run(opts *Options) { } patternBuilder := func(runes []rune) *Pattern { return BuildPattern( - opts.Fuzzy, opts.Extended, opts.Case, forward, opts.Filter == nil, - opts.Nth, opts.Delimiter, runes) + opts.Fuzzy, opts.FuzzyAlgo, opts.Extended, opts.Case, forward, + opts.Filter == nil, opts.Nth, opts.Delimiter, runes) } matcher := NewMatcher(patternBuilder, sort, opts.Tac, eventBox) @@ -158,11 +158,12 @@ func Run(opts *Options) { found := false if streamingFilter { + slab := util.MakeSlab(slab16Size, slab32Size) reader := Reader{ func(runes []byte) bool { item := chunkList.trans(runes, 0) if item != nil { - if result, _ := pattern.MatchItem(item); result != nil { + if result, _, _ := pattern.MatchItem(item, false, slab); result != nil { fmt.Println(item.text.ToString()) found = true } |