You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Took should return int.MaxValue when value is greater than int
Add clear obsolete messages on Took int properties
Add JsonIgnore attributes to Took fields so that Json serializer ignores them when enumerating properties to serializes
Fix build warnings for usage of Took and check TookAsLong value is populated
Copy file name to clipboardExpand all lines: src/Nest/Document/Multiple/Bulk/BulkResponse.cs
+21-23Lines changed: 21 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,17 @@ namespace Nest
8
8
{
9
9
publicinterfaceIBulkResponse:IResponse
10
10
{
11
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
12
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
11
+
/// <summary>
12
+
/// Time in milliseconds for Elasticsearch to execute the search
13
+
/// </summary>
14
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
13
15
intTook{get;}
16
+
17
+
/// <summary>
18
+
/// Time in milliseconds for Elasticsearch to execute the search
/// Time in milliseconds for Elasticsearch to execute the search
41
+
/// </summary>
32
42
[JsonProperty("took")]
33
43
publiclongTookAsLong{get;internalset;}
34
44
35
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
36
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
37
-
publicintTook
38
-
{
39
-
get
40
-
{
41
-
returnunchecked((int)TookAsLong);
42
-
}
43
-
internalset
44
-
{
45
-
TookAsLong=value;
46
-
}
47
-
}
45
+
/// <summary>
46
+
/// Time in milliseconds for Elasticsearch to execute the search
47
+
/// </summary>
48
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
Copy file name to clipboardExpand all lines: src/Nest/Document/Single/TermVectors/TermVectorsResponse.cs
+20-16Lines changed: 20 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,18 @@ public interface ITermVectorsResponse : IResponse
11
11
stringId{get;}
12
12
longVersion{get;}
13
13
boolFound{get;}
14
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
15
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
14
+
15
+
/// <summary>
16
+
/// Time in milliseconds for Elasticsearch to execute the search
17
+
/// </summary>
18
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
16
19
intTook{get;}
20
+
21
+
/// <summary>
22
+
/// Time in milliseconds for Elasticsearch to execute the search
23
+
/// </summary>
17
24
longTookAsLong{get;}
25
+
18
26
IDictionary<string,TermVector>TermVectors{get;}
19
27
}
20
28
@@ -36,22 +44,18 @@ public class TermVectorsResponse : ResponseBase, ITermVectorsResponse
36
44
[JsonProperty("found")]
37
45
publicboolFound{get;internalset;}
38
46
39
-
[JsonProperty(PropertyName="took")]
47
+
/// <summary>
48
+
/// Time in milliseconds for Elasticsearch to execute the search
49
+
/// </summary>
50
+
[JsonProperty("took")]
40
51
publiclongTookAsLong{get;internalset;}
41
52
42
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
43
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
44
-
publicintTook
45
-
{
46
-
get
47
-
{
48
-
returnunchecked((int)TookAsLong);
49
-
}
50
-
internalset
51
-
{
52
-
TookAsLong=value;
53
-
}
54
-
}
53
+
/// <summary>
54
+
/// Time in milliseconds for Elasticsearch to execute the search
55
+
/// </summary>
56
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
Copy file name to clipboardExpand all lines: src/Nest/Search/Percolator/Percolate/PercolateResponse.cs
+28-26Lines changed: 28 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,18 @@
6
6
namespaceNest
7
7
{
8
8
publicinterfaceIPercolateCountResponse:IResponse
9
-
{
10
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
11
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
9
+
{
10
+
/// <summary>
11
+
/// Time in milliseconds for Elasticsearch to execute the search
12
+
/// </summary>
13
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
12
14
intTook{get;}
15
+
16
+
/// <summary>
17
+
/// Time in milliseconds for Elasticsearch to execute the search
18
+
/// </summary>
13
19
longTookAsLong{get;}
20
+
14
21
longTotal{get;}
15
22
}
16
23
@@ -21,34 +28,30 @@ public interface IPercolateResponse : IPercolateCountResponse
/// Time in milliseconds for Elasticsearch to execute the search
34
+
/// </summary>
25
35
[JsonProperty("took")]
26
36
publiclongTookAsLong{get;internalset;}
27
37
28
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
29
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
30
-
publicintTook
31
-
{
32
-
get
33
-
{
34
-
returnunchecked((int)TookAsLong);
35
-
}
36
-
internalset
37
-
{
38
-
TookAsLong=value;
39
-
}
40
-
}
38
+
/// <summary>
39
+
/// Time in milliseconds for Elasticsearch to execute the search
40
+
/// </summary>
41
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
Copy file name to clipboardExpand all lines: src/Nest/Search/Search/SearchResponse.cs
+18-15Lines changed: 18 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,17 @@ public interface ISearchResponse<T> : IResponse where T : class
15
15
AggregationsHelperAggs{get;}
16
16
IDictionary<string,Suggest[]>Suggest{get;}
17
17
18
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
19
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
18
+
/// <summary>
19
+
/// Time in milliseconds for Elasticsearch to execute the search
20
+
/// </summary>
21
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
20
22
intTook{get;}
23
+
24
+
/// <summary>
25
+
/// Time in milliseconds for Elasticsearch to execute the search
26
+
/// </summary>
21
27
longTookAsLong{get;}
28
+
22
29
boolTimedOut{get;}
23
30
boolTerminatedEarly{get;}
24
31
stringScrollId{get;}
@@ -68,22 +75,18 @@ public class SearchResponse<T> : ResponseBase, ISearchResponse<T> where T : clas
/// Time in milliseconds for Elasticsearch to execute the search
80
+
/// </summary>
71
81
[JsonProperty("took")]
72
82
publiclongTookAsLong{get;internalset;}
73
83
74
-
[Obsolete(@"Took field is an Int but the value in the response can exced the max value for Int.
75
-
If you use this field instead of TookAsLong the value can wrap around if it is too big.")]
76
-
publicintTook
77
-
{
78
-
get
79
-
{
80
-
returnunchecked((int)TookAsLong);
81
-
}
82
-
internalset
83
-
{
84
-
TookAsLong=value;
85
-
}
86
-
}
84
+
/// <summary>
85
+
/// Time in milliseconds for Elasticsearch to execute the search
86
+
/// </summary>
87
+
[Obsolete(@"returned value may be larger than int. In this case, value will be int.MaxValue and TookAsLong field can be checked. Took is long in 5.0.0")]
0 commit comments