mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add the use of a SearchManager
This commit is contained in:
parent
78b797e43b
commit
690d60b701
2 changed files with 13 additions and 10 deletions
|
|
@ -1,10 +1,8 @@
|
|||
using Flow.Launcher.Infrastructure.Storage;
|
||||
using Flow.Launcher.Plugin.Explorer.Search.WindowsIndex;
|
||||
using Flow.Launcher.Plugin.Explorer.Search;
|
||||
using Flow.Launcher.Plugin.Explorer.ViewModels;
|
||||
using Flow.Launcher.Plugin.Explorer.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Controls;
|
||||
|
||||
|
|
@ -51,13 +49,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
if (regexMatch.Success)
|
||||
return results;
|
||||
|
||||
var queryConstructor = new QueryConstructor(_settings);
|
||||
|
||||
var searcher = new IndexSearcher(Context);
|
||||
|
||||
return searcher.WindowsIndexSearch(query.Search,
|
||||
queryConstructor.CreateQueryHelper().ConnectionString,
|
||||
queryConstructor.QueryForAllFilesAndFolders);
|
||||
return new SearchManager(_settings, Context).Search(query.Search);
|
||||
}
|
||||
|
||||
public void Save()
|
||||
|
|
|
|||
|
|
@ -61,5 +61,16 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
return results;
|
||||
}
|
||||
|
||||
internal List<Result> WindowsIndexFilesAndFoldersSearch(string querySearchString)
|
||||
{
|
||||
var queryConstructor = new QueryConstructor(_settings);
|
||||
|
||||
var searcher = new IndexSearcher(_context);
|
||||
|
||||
return searcher.WindowsIndexSearch(querySearchString,
|
||||
queryConstructor.CreateQueryHelper().ConnectionString,
|
||||
queryConstructor.QueryForAllFilesAndFolders);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue