Skip to content

Commit 53c54fa

Browse files
committed
Intorduce EndOffset to Analyze token
Deprecate misspelt EndPostion
1 parent ad444e3 commit 53c54fa

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
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; }
1011

11-
[JsonProperty(PropertyName = "type")]
12+
[JsonProperty("type")]
1213
public string Type { get; internal set; }
1314

1415
//TODO change to long in 6.0
15-
[JsonProperty(PropertyName = "start_offset")]
16+
[JsonProperty("start_offset")]
1617
public int StartOffset { get; internal set; }
1718

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

21-
[JsonProperty(PropertyName = "position")]
22+
[JsonProperty("end_offset")]
23+
public int EndOffset { get; internal set; }
24+
25+
[JsonProperty("position")]
2226
public int Position { get; internal set; }
2327

24-
[JsonProperty(PropertyName = "position_length")]
28+
[JsonProperty("position_length")]
2529
public long? PositionLength { get; internal set; }
26-
2730
}
2831
}

0 commit comments

Comments
 (0)