You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This uses the Microsoft.Search.Interop assembly
40
+
// Throws COMException if Windows Search service is not running/disabled, this needs to be caught
44
41
varmanager=newCSearchManager();
45
42
46
43
// SystemIndex catalog is the default catalog in Windows
@@ -67,7 +64,7 @@ public string Directory(ReadOnlySpan<char> path, ReadOnlySpan<char> searchString
67
64
?RecursiveDirectoryConstraint(path)
68
65
:TopLevelDirectoryConstraint(path);
69
66
70
-
varquery=$"SELECT TOP {Settings.MaxResult}{BaseQueryHelper.QuerySelectColumns} FROM {SystemIndex} WHERE {scopeConstraint}{queryConstraint} ORDER BY {FileName}";
67
+
varquery=$"SELECT TOP {settings.MaxResult}{CreateBaseQuery().QuerySelectColumns} FROM {SystemIndex} WHERE {scopeConstraint}{queryConstraint} ORDER BY {FileName}";
71
68
72
69
returnquery;
73
70
}
@@ -81,7 +78,7 @@ public string FilesAndFolders(ReadOnlySpan<char> userSearchString)
81
78
userSearchString="*";
82
79
83
80
// Generate SQL from constructed parameters, converting the userSearchString from AQS->WHERE clause
84
-
return$"{BaseQueryHelper.GenerateSQLFromUserQuery(userSearchString.ToString())} AND {RestrictionsForAllFilesAndFoldersSearch} ORDER BY {FileName}";
81
+
return$"{CreateBaseQuery().GenerateSQLFromUserQuery(userSearchString.ToString())} AND {RestrictionsForAllFilesAndFoldersSearch} ORDER BY {FileName}";
85
82
}
86
83
87
84
///<summary>
@@ -101,7 +98,7 @@ public string FilesAndFolders(ReadOnlySpan<char> userSearchString)
$"SELECT TOP {Settings.MaxResult}{BaseQueryHelper.QuerySelectColumns} FROM {SystemIndex} WHERE {RestrictionsForFileContentSearch(userSearchString)} AND {RestrictionsForAllFilesAndFoldersSearch} ORDER BY {FileName}";
101
+
$"SELECT TOP {settings.MaxResult}{CreateBaseQuery().QuerySelectColumns} FROM {SystemIndex} WHERE {RestrictionsForFileContentSearch(userSearchString)} AND {RestrictionsForAllFilesAndFoldersSearch} ORDER BY {FileName}";
0 commit comments