File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
Nest/Domain/Analysis/TokenFilter
Tests/Nest.Tests.Unit/Core/Indices/Analysis/TokenFilters Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,24 @@ public StopTokenFilter() : base("stop")
1313
1414 }
1515
16- [ JsonProperty ( "enable_position_increments" ) ]
16+ [ JsonProperty ( "stopwords" ) ]
17+ internal object _Stopwords { get ; set ; }
18+
19+ [ JsonIgnore ]
20+ public IEnumerable < string > Stopwords
21+ {
22+ get { return _Stopwords as IEnumerable < string > ; }
23+ set { _Stopwords = value ; }
24+ }
25+
26+ [ JsonIgnore ]
27+ public string PredefinedStopwords
28+ {
29+ get { return _Stopwords as string ; }
30+ set { _Stopwords = value ; }
31+ }
32+
33+ [ JsonProperty ( "enable_position_increments" ) ]
1734 public bool ? EnablePositionIncrements { get ; set ; }
1835
1936 [ JsonProperty ( "ignore_case" ) ]
@@ -22,9 +39,6 @@ public StopTokenFilter() : base("stop")
2239 [ JsonProperty ( "stopwords_path" ) ]
2340 public string StopwordsPath { get ; set ; }
2441
25- [ JsonProperty ( "stopwords" ) ]
26- public object Stopwords { get ; set ; }
27-
2842 [ JsonProperty ( "remove_trailing" ) ]
2943 public bool ? RemoveTrailing { get ; set ; }
3044 }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public void TestStopTokenFilterWithPredefinedLanguageList()
3333 . TokenFilters ( t => t
3434 . Add ( "my_stop" , new StopTokenFilter
3535 {
36- Stopwords = "_english_"
36+ PredefinedStopwords = "_english_"
3737 } )
3838 )
3939 ) ;
You can’t perform that action at this time.
0 commit comments