From 891ef2151a555689e8a3f41a2074ff85de80807b Mon Sep 17 00:00:00 2001 From: omrif Date: Sun, 14 Sep 2014 15:24:07 +0300 Subject: [PATCH] report if search timed out in the response. --- src/Nest/Domain/Responses/SearchResponse.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Nest/Domain/Responses/SearchResponse.cs b/src/Nest/Domain/Responses/SearchResponse.cs index 4577e90d8e3..7fe32861dd4 100644 --- a/src/Nest/Domain/Responses/SearchResponse.cs +++ b/src/Nest/Domain/Responses/SearchResponse.cs @@ -18,7 +18,8 @@ public interface ISearchResponse : IResponse where T : class int ElapsedMilliseconds { get; } string ScrollId { get; } long Total { get; } - double MaxScore { get; } + double MaxScore { get; } + bool TimedOut { get; } /// /// Returns a view on the documents inside the hits that are returned. /// NOTE: if you use Fields() on the search descriptor .Documents will be empty use @@ -76,7 +77,10 @@ public AggregationsHelper Aggs public IDictionary Suggest { get; internal set; } [JsonProperty(PropertyName = "took")] - public int ElapsedMilliseconds { get; internal set; } + public int ElapsedMilliseconds { get; internal set; } + + [JsonProperty(PropertyName = "timed_out")] + public bool TimedOut { get; internal set; } /// /// Only set when search type = scan and scroll specified