@@ -42,7 +42,7 @@ internal List<Result> Search(Query query)
42
42
if ( string . IsNullOrEmpty ( querySearch ) )
43
43
return results ;
44
44
45
- if ( IsFileContentSearch ( querySearch ) )
45
+ if ( IsFileContentSearch ( query . ActionKeyword ) )
46
46
return WindowsIndexFileContentSearch ( query , querySearch ) ;
47
47
48
48
var isEnvironmentVariable = EnvironmentVariables . IsEnvironmentVariableSearch ( querySearch ) ;
@@ -81,24 +81,18 @@ private List<Result> WindowsIndexFileContentSearch(Query query, string querySear
81
81
{
82
82
var queryConstructor = new QueryConstructor ( settings ) ;
83
83
84
- var updatedQuerySearchString = querySearchString
85
- . Substring ( querySearchString
86
- . IndexOf ( Constants . WindowsIndexFileContentSearchHotkey )
87
- + Constants . WindowsIndexFileContentSearchHotkey . Length ) ;
88
-
89
- if ( string . IsNullOrEmpty ( updatedQuerySearchString ) )
84
+ if ( string . IsNullOrEmpty ( querySearchString ) )
90
85
return new List < Result > ( ) ;
91
86
92
- return indexSearch . WindowsIndexSearch ( updatedQuerySearchString . TrimStart ( ) ,
87
+ return indexSearch . WindowsIndexSearch ( querySearchString ,
93
88
queryConstructor . CreateQueryHelper ( ) . ConnectionString ,
94
89
queryConstructor . QueryForFileContentSearch ,
95
90
query ) ;
96
91
}
97
92
98
- public bool IsFileContentSearch ( string querySearch )
93
+ public bool IsFileContentSearch ( string actionKeyword )
99
94
{
100
- return querySearch . StartsWith ( Constants . WindowsIndexFileContentSearchHotkey ,
101
- StringComparison . OrdinalIgnoreCase ) ;
95
+ return actionKeyword == settings . FileContentSearchActionKeyword ;
102
96
}
103
97
104
98
private List < Result > DirectoryInfoClassSearch ( Query query , string querySearch )
0 commit comments