88namespace Nest
99{
1010 //[JsonConverter(typeof(ConcreteTypeConverter))]
11- public interface IHit < out T > where T : class
12- {
13- IFieldSelection < T > Fields { get ; }
14- T Source { get ; }
15- string Index { get ; }
16- double Score { get ; }
17- string Type { get ; }
18- string Version { get ; }
19- string Id { get ; }
11+ public interface IHit < out T > where T : class
12+ {
13+ // IFieldSelection<T> Fields { get; }
14+ T Source { get ; }
15+ string Index { get ; }
16+ double Score { get ; }
17+ string Type { get ; }
18+ string Version { get ; }
19+ string Id { get ; }
2020
21- IEnumerable < object > Sorts { get ; }
21+ IEnumerable < object > Sorts { get ; }
2222
2323 HighlightFieldDictionary Highlights { get ; }
24- Explanation Explanation { get ; }
25- ICovariantDictionary < T > PartialFields { get ; }
26- }
24+ Explanation Explanation { get ; }
25+ }
2726
28- [ JsonObject ]
29- public class Hit < T > : IHit < T >
30- where T : class
31- {
32- [ JsonProperty ( PropertyName = "fields" ) ]
27+ [ JsonObject ]
28+ public class Hit < T > : IHit < T >
29+ where T : class
30+ {
31+ [ JsonProperty ( PropertyName = "fields" ) ]
3332 internal IDictionary < string , object > _fields { get ; set ; }
3433 [ JsonIgnore ]
35- public IFieldSelection < T > Fields { get ; internal set ; }
36- [ JsonProperty ( PropertyName = "_source" ) ]
37- public T Source { get ; internal set ; }
38- [ JsonProperty ( PropertyName = "_index" ) ]
39- public string Index { get ; internal set ; }
40- [ JsonProperty ( PropertyName = "_score" ) ]
41- public double Score { get ; internal set ; }
42- [ JsonProperty ( PropertyName = "_type" ) ]
43- public string Type { get ; internal set ; }
44- [ JsonProperty ( PropertyName = "_version" ) ]
45- public string Version { get ; internal set ; }
46- [ JsonProperty ( PropertyName = "_id" ) ]
47- public string Id { get ; internal set ; }
34+ public FieldSelection < T > Fields { get ; internal set ; }
35+ [ JsonProperty ( PropertyName = "_source" ) ]
36+ public T Source { get ; internal set ; }
37+ [ JsonProperty ( PropertyName = "_index" ) ]
38+ public string Index { get ; internal set ; }
39+ [ JsonProperty ( PropertyName = "_score" ) ]
40+ public double Score { get ; internal set ; }
41+ [ JsonProperty ( PropertyName = "_type" ) ]
42+ public string Type { get ; internal set ; }
43+ [ JsonProperty ( PropertyName = "_version" ) ]
44+ public string Version { get ; internal set ; }
45+ [ JsonProperty ( PropertyName = "_id" ) ]
46+ public string Id { get ; internal set ; }
4847
49- [ JsonProperty ( PropertyName = "sort" ) ]
50- public IEnumerable < object > Sorts { get ; internal set ; }
48+ [ JsonProperty ( PropertyName = "sort" ) ]
49+ public IEnumerable < object > Sorts { get ; internal set ; }
5150
52- [ JsonProperty ( PropertyName = "highlight" ) ]
51+ [ JsonProperty ( PropertyName = "highlight" ) ]
5352 [ JsonConverter ( typeof ( DictionaryKeysAreNotPropertyNamesJsonConverter ) ) ]
5453 internal Dictionary < string , List < string > > _Highlight { get ; set ; }
5554
@@ -65,21 +64,14 @@ public HighlightFieldDictionary Highlights
6564 DocumentId = this . Id ,
6665 Field = kv . Key ,
6766 Highlights = kv . Value
68- } ) . ToDictionary ( k=> k . Field , v=> v ) ;
67+ } ) . ToDictionary ( k => k . Field , v => v ) ;
6968
7069 return new HighlightFieldDictionary ( highlights ) ;
71- }
70+ }
7271 }
7372
7473 [ JsonProperty ( PropertyName = "_explanation" ) ]
7574 public Explanation Explanation { get ; internal set ; }
7675
77-
78- public ICovariantDictionary < T > PartialFields { get ; internal set ; }
79-
80- public Hit ( )
81- {
82-
83- }
84- }
76+ }
8577}
0 commit comments