Skip to content

Commit aa49e90

Browse files
committed
Revert AnalyzeRequest body properties to deprecated names
char_filters and filters are deprecated in 2.4.0+ and it is recommended to use char_filter and filter. However, NEST 2.x needs to support all Elasticsearch 2.x versions, which throw an exception with the new names. Therefore use the deprecated names in the body of an analyze request
1 parent d781af1 commit aa49e90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Nest/Indices/Analyze/AnalyzeRequest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ public partial interface IAnalyzeRequest
1515

1616
///<summary>A collection of character filters to use for the analysis</summary>
1717
[Obsolete("Deprecated in 2.4.0. Will be removed in 5.0. Use CharFilter instead")]
18+
[JsonIgnore]
1819
string[] CharFilters { get; set; }
1920

2021
///<summary>A collection of character filters to use for the analysis</summary>
21-
[JsonProperty("char_filter")]
22+
[JsonProperty("char_filters")]
2223
string[] CharFilter { get; set; }
2324

2425
///<summary>A collection of filters to use for the analysis</summary>
25-
[JsonProperty("filter")]
26+
[JsonProperty("filters")]
2627
string[] Filter { get; set; }
2728

2829
///<summary>Use the analyzer configured for this field (instead of passing the analyzer name)</summary>
@@ -31,6 +32,7 @@ public partial interface IAnalyzeRequest
3132

3233
///<summary>A collection of filters to use for the analysis</summary>
3334
[Obsolete("Deprecated in 2.4.0. Will be removed in 5.0. Use Filter instead")]
35+
[JsonIgnore]
3436
string[] Filters { get; set; }
3537

3638
///<summary>The text on which the analysis should be performed (when request body is not used)</summary>

0 commit comments

Comments
 (0)