@@ -12,11 +12,11 @@ public Query() { }
12
12
/// <summary>
13
13
/// to allow unit tests for plug ins
14
14
/// </summary>
15
- public Query ( string rawQuery , string search , string [ ] terms , string actionKeyword = "" )
15
+ public Query ( string rawQuery , string search , string [ ] terms , string [ ] searchTerms , string actionKeyword = "" )
16
16
{
17
17
Search = search ;
18
18
RawQuery = rawQuery ;
19
- Terms = terms ;
19
+ SearchTerms = searchTerms ;
20
20
ActionKeyword = actionKeyword ;
21
21
}
22
22
@@ -35,18 +35,31 @@ public Query(string rawQuery, string search, string[] terms, string actionKeywor
35
35
public string Search { get ; internal init ; }
36
36
37
37
/// <summary>
38
- /// The raw query splited into a string array.
38
+ /// The search string split into a string array.
39
39
/// </summary>
40
+ public string [ ] SearchTerms { get ; init ; }
41
+
42
+ /// <summary>
43
+ /// The raw query split into a string array
44
+ /// </summary>
45
+ [ Obsolete ( "It may or may not include action keyword, which can be confusing. Use SearchTerms instead" ) ]
40
46
public string [ ] Terms { get ; init ; }
41
47
42
48
/// <summary>
43
49
/// Query can be splited into multiple terms by whitespace
44
50
/// </summary>
45
51
public const string TermSeparator = " " ;
52
+
53
+ [ Obsolete ( "Typo" ) ]
54
+ public const string TermSeperater = TermSeparator ;
46
55
/// <summary>
47
56
/// User can set multiple action keywords seperated by ';'
48
57
/// </summary>
49
58
public const string ActionKeywordSeparator = ";" ;
59
+
60
+ [ Obsolete ( "Typo" ) ]
61
+ public const string ActionKeywordSeperater = ActionKeywordSeparator ;
62
+
50
63
51
64
/// <summary>
52
65
/// '*' is used for System Plugin
@@ -65,7 +78,7 @@ public Query(string rawQuery, string search, string[] terms, string actionKeywor
65
78
/// <summary>
66
79
/// strings from second search (including) to last search
67
80
/// </summary>
68
- public string SecondToEndSearch => _secondToEndSearch ??= string . Join ( ' ' , Terms . AsMemory ( 2 ) ) ;
81
+ public string SecondToEndSearch => _secondToEndSearch ??= string . Join ( ' ' , SearchTerms . AsMemory ( 2 ) ) ;
69
82
70
83
/// <summary>
71
84
/// Return second search split by space if it has
@@ -79,7 +92,7 @@ public Query(string rawQuery, string search, string[] terms, string actionKeywor
79
92
80
93
private string SplitSearch ( int index )
81
94
{
82
- return index < Terms . Length ? Terms [ index ] : string . Empty ;
95
+ return index < SearchTerms . Length ? SearchTerms [ index ] : string . Empty ;
83
96
}
84
97
85
98
public override string ToString ( ) => RawQuery ;
0 commit comments