﻿using Newtonsoft.Json;

namespace Nest
{
	[JsonObject]
	public class AnalyzeToken
	{
		[JsonProperty(PropertyName = "token")]
		public string Token { get; internal set; }

		[JsonProperty(PropertyName = "type")]
		public string Type { get; internal set; }

		//TODO change to long in 6.0
		[JsonProperty(PropertyName = "start_offset")]
		public int StartOffset { get; internal set; }

		[JsonProperty(PropertyName = "end_offset")]
		public int EndPostion { get; internal set; }

		[JsonProperty(PropertyName = "position")]
		public int Position { get; internal set; }

		[JsonProperty(PropertyName = "position_length")]
		public long? PositionLength { get; internal set; }

	}
}

﻿using System;
using Newtonsoft.Json;

namespace Nest
{
	[JsonObject]
	public class AnalyzeToken
	{
		[JsonProperty("token")]
		public string Token { get; internal set; }

		[JsonProperty("type")]
		public string Type { get; internal set; }

		//TODO change to long in 6.0... RC: (this is int in Elasticsearch codebase)
		[JsonProperty("start_offset")]
		public int StartOffset { get; internal set; }

		[JsonProperty("end_offset")]
		public int EndOffset { get; internal set; }

		[JsonProperty("position")]
		public int Position { get; internal set; }

		[JsonProperty("position_length")]
		public long? PositionLength { get; internal set; }
	}
}

Introduce EndOffset to Analyze token
Introduce EndOffset to Analyze token

remove misspelt EndPostion

(cherry picked from commit 5e4e0e5f357edbc5c8cef3630d2f4fb40a9066d6)
