Skip to content

Commit

Permalink
add in fuzzy to http
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Jul 26, 2023
1 parent dc407e6 commit 676d798
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion http.go
Expand Up @@ -139,9 +139,12 @@ func StartHttpServer() {
toProcessQueue := make(chan *FileJob, runtime.NumCPU()) // Files to be read into memory for processing
summaryQueue := make(chan *FileJob, runtime.NumCPU()) // Files that match and need to be displayed

q, fuzzy := PreParseQuery(strings.Fields(query))

fileReaderWorker := NewFileReaderWorker(files, toProcessQueue)
fileReaderWorker.FuzzyMatch = fuzzy
fileSearcher := NewSearcherWorker(toProcessQueue, summaryQueue)
fileSearcher.SearchString = strings.Fields(query)
fileSearcher.SearchString = q

resultSummarizer := NewResultSummarizer(summaryQueue)
resultSummarizer.FileReaderWorker = fileReaderWorker
Expand Down

0 comments on commit 676d798

Please sign in to comment.