mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
pass query helper object
This commit is contained in:
parent
f588f2a763
commit
bd15aa7ef9
2 changed files with 13 additions and 11 deletions
|
|
@ -143,7 +143,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
return await IndexSearch.WindowsIndexSearchAsync(
|
||||
querySearchString,
|
||||
queryConstructor.CreateQueryHelper,
|
||||
queryConstructor.CreateQueryHelper(),
|
||||
queryConstructor.QueryForFileContentSearch,
|
||||
Settings.IndexSearchExcludedSubdirectoryPaths,
|
||||
query,
|
||||
|
|
@ -181,7 +181,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
return await IndexSearch.WindowsIndexSearchAsync(
|
||||
querySearchString,
|
||||
queryConstructor.CreateQueryHelper,
|
||||
queryConstructor.CreateQueryHelper(),
|
||||
queryConstructor.QueryForAllFilesAndFolders,
|
||||
Settings.IndexSearchExcludedSubdirectoryPaths,
|
||||
query,
|
||||
|
|
@ -193,8 +193,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
{
|
||||
var queryConstructor = new QueryConstructor(Settings);
|
||||
|
||||
return await IndexSearch.WindowsIndexSearchAsync(path,
|
||||
queryConstructor.CreateQueryHelper,
|
||||
return await IndexSearch.WindowsIndexSearchAsync(
|
||||
path,
|
||||
queryConstructor.CreateQueryHelper(),
|
||||
queryConstructor.QueryForTopLevelDirectorySearch,
|
||||
Settings.IndexSearchExcludedSubdirectoryPaths,
|
||||
query,
|
||||
|
|
|
|||
|
|
@ -86,12 +86,13 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
|
|||
return results;
|
||||
}
|
||||
|
||||
internal async static Task<List<Result>> WindowsIndexSearchAsync(string searchString,
|
||||
Func<CSearchQueryHelper> queryHelper,
|
||||
Func<string, string> constructQuery,
|
||||
List<AccessLink> exclusionList,
|
||||
Query query,
|
||||
CancellationToken token)
|
||||
internal async static Task<List<Result>> WindowsIndexSearchAsync(
|
||||
string searchString,
|
||||
CSearchQueryHelper queryHelper,
|
||||
Func<string, string> constructQuery,
|
||||
List<AccessLink> exclusionList,
|
||||
Query query,
|
||||
CancellationToken token)
|
||||
{
|
||||
var regexMatch = Regex.Match(searchString, reservedStringPattern);
|
||||
|
||||
|
|
@ -103,7 +104,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
|
|||
var constructedQuery = constructQuery(searchString);
|
||||
|
||||
return RemoveResultsInExclusionList(
|
||||
await ExecuteWindowsIndexSearchAsync(constructedQuery, queryHelper().ConnectionString, query, token).ConfigureAwait(false),
|
||||
await ExecuteWindowsIndexSearchAsync(constructedQuery, queryHelper.ConnectionString, query, token).ConfigureAwait(false),
|
||||
exclusionList,
|
||||
token);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue