Skip to content

Commit 88ca9f5

Browse files
committed
Introduce EndOffset to Analyze token
Deprecate misspelt EndPostion (cherry-picked from commit 5e4e0e5)
1 parent 94ad884 commit 88ca9f5

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
using Newtonsoft.Json;
1+
using System;
2+
using Newtonsoft.Json;
23

34
namespace Nest
45
{
56
[JsonObject]
67
public class AnalyzeToken
78
{
8-
[JsonProperty(PropertyName = "token")]
9+
[JsonProperty("token")]
910
public string Token { get; internal set; }
10-
[JsonProperty(PropertyName = "type")]
11+
12+
[JsonProperty("type")]
1113
public string Type { get; internal set; }
12-
13-
[JsonProperty(PropertyName = "start_offset")]
14+
15+
[JsonProperty("start_offset")]
1416
public int StartOffset { get; internal set; }
15-
[JsonProperty(PropertyName = "end_offset")]
16-
public int EndPostion { get; internal set; }
1717

18-
[JsonProperty(PropertyName = "position")]
19-
public int Position { get; internal set; }
18+
[Obsolete("Use EndOffset")]
19+
public int EndPostion => EndOffset;
2020

21+
[JsonProperty("end_offset")]
22+
public int EndOffset { get; internal set; }
23+
24+
[JsonProperty("position")]
25+
public int Position { get; internal set; }
2126
}
2227
}

0 commit comments

Comments
 (0)