From 48e50ba37c24cc2a3125ed0853708f3ca51f13bb Mon Sep 17 00:00:00 2001 From: udi Date: Tue, 23 Dec 2014 00:29:18 +0200 Subject: [PATCH] Fix wrong property mapping in SearchShard --- .../Domain/Responses/SearchShardsResponse.cs | 109 +++++++++--------- 1 file changed, 57 insertions(+), 52 deletions(-) diff --git a/src/Nest/Domain/Responses/SearchShardsResponse.cs b/src/Nest/Domain/Responses/SearchShardsResponse.cs index 90fc4697cd1..7a946bcae75 100644 --- a/src/Nest/Domain/Responses/SearchShardsResponse.cs +++ b/src/Nest/Domain/Responses/SearchShardsResponse.cs @@ -1,53 +1,58 @@ -using System.Collections.Generic; -using Nest.Domain; -using Newtonsoft.Json; -using System.Linq.Expressions; -using System; -using System.Linq; - -namespace Nest -{ - [JsonObject(MemberSerialization.OptIn)] - public interface ISearchShardsResponse : IResponse - { - [JsonProperty("shards")] - IEnumerable> Shards { get; } - - [JsonProperty("nodes")] - IDictionary Nodes { get; } - } - - public class SearchShardsResponse : BaseResponse, ISearchShardsResponse - { - public IEnumerable> Shards { get; internal set; } - public IDictionary Nodes { get; internal set; } - } - - - [JsonObject(MemberSerialization.OptIn)] - public class SearchNode - { - [JsonProperty("name")] - public string Name { get; set; } - [JsonProperty("transport_address")] - public string TransportAddress { get; set; } - - } - - [JsonObject(MemberSerialization.OptIn)] - public class SearchShard - { - [JsonProperty("name")] - public string State { get; set;} - [JsonProperty("primary")] - public bool Primary { get; set;} - [JsonProperty("node")] - public string Node { get; set;} - [JsonProperty("relocating_node")] - public string RelocatingNode { get; set;} - [JsonProperty("shard")] - public int Shard { get; set;} - [JsonProperty("index")] - public string Index { get; set;} - } +using Nest.Domain; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; + +namespace Nest +{ + [JsonObject(MemberSerialization.OptIn)] + public interface ISearchShardsResponse : IResponse + { + [JsonProperty("shards")] + IEnumerable> Shards { get; } + + [JsonProperty("nodes")] + IDictionary Nodes { get; } + } + + public class SearchShardsResponse : BaseResponse, ISearchShardsResponse + { + public IEnumerable> Shards { get; internal set; } + + public IDictionary Nodes { get; internal set; } + } + + [JsonObject(MemberSerialization.OptIn)] + public class SearchNode + { + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("transport_address")] + public string TransportAddress { get; set; } + } + + [JsonObject(MemberSerialization.OptIn)] + public class SearchShard + { + [JsonProperty("state")] + public string State { get; set; } + + [JsonProperty("primary")] + public bool Primary { get; set; } + + [JsonProperty("node")] + public string Node { get; set; } + + [JsonProperty("relocating_node")] + public string RelocatingNode { get; set; } + + [JsonProperty("shard")] + public int Shard { get; set; } + + [JsonProperty("index")] + public string Index { get; set; } + } } \ No newline at end of file