Skip to content

Commit 676d798

Browse files
committed
add in fuzzy to http
1 parent dc407e6 commit 676d798

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

http.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,12 @@ func StartHttpServer() {
139139
toProcessQueue := make(chan *FileJob, runtime.NumCPU()) // Files to be read into memory for processing
140140
summaryQueue := make(chan *FileJob, runtime.NumCPU()) // Files that match and need to be displayed
141141

142+
q, fuzzy := PreParseQuery(strings.Fields(query))
143+
142144
fileReaderWorker := NewFileReaderWorker(files, toProcessQueue)
145+
fileReaderWorker.FuzzyMatch = fuzzy
143146
fileSearcher := NewSearcherWorker(toProcessQueue, summaryQueue)
144-
fileSearcher.SearchString = strings.Fields(query)
147+
fileSearcher.SearchString = q
145148

146149
resultSummarizer := NewResultSummarizer(summaryQueue)
147150
resultSummarizer.FileReaderWorker = fileReaderWorker

0 commit comments

Comments
 (0)