Skip to content

Commit 920b3f1

Browse files
Mpdreamzawelburn
authored andcommitted
expose num_reduce_phases as per elastic/elasticsearch#23288
Conflicts: src/Nest/Search/Search/SearchResponse.cs
1 parent 9de13b5 commit 920b3f1

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

src/Nest/Search/Search/SearchResponse.cs

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,22 @@ public interface ISearchResponse<T> : IResponse where T : class
7272
/// </summary>
7373
double MaxScore { get; }
7474

75-
/// <summary>
76-
/// Gets the documents inside the hits, by deserializing <see cref="IHitMetadata{T}.Source"/> into T.
77-
/// <para>NOTE: if you use <see cref="ISearchRequest.StoredFields"/> on the search request,
78-
/// <see cref="Documents"/> will be empty and you should use <see cref="Fields"/>
79-
/// instead to get the field values. As an alternative to
80-
/// <see cref="Fields"/>, try source filtering using <see cref="ISearchRequest.Source"/> on the
81-
/// search request to return <see cref="Documents"/> with partial fields selected
82-
/// </para>
83-
/// </summary>
84-
IReadOnlyCollection<T> Documents { get; }
75+
IReadOnlyCollection<T> Documents { get; }
76+
77+
/// Number of times the server performed an incremental reduce phase
78+
/// </summary>
79+
long NumberOfReducePhases { get; }
80+
81+
/// <summary>
82+
/// Gets the documents inside the hits, by deserializing <see cref="IHitMetadata{T}.Source"/> into T.
83+
/// <para>NOTE: if you use <see cref="ISearchRequest.StoredFields"/> on the search request,
84+
/// <see cref="Documents"/> will be empty and you should use <see cref="Fields"/>
85+
/// instead to get the field values. As an alternative to
86+
/// <see cref="Fields"/>, try source filtering using <see cref="ISearchRequest.Source"/> on the
87+
/// search request to return <see cref="Documents"/> with partial fields selected
88+
/// </para>
89+
/// </summary>
90+
IReadOnlyCollection<T> Documents { get; }
8591

8692
/// <summary>
8793
/// Gets the collection of hits that matched the query
@@ -140,6 +146,9 @@ public class SearchResponse<T> : ResponseBase, ISearchResponse<T> where T : clas
140146
[JsonProperty(PropertyName = "hits")]
141147
public HitsMetaData<T> HitsMetaData { get; internal set; }
142148

149+
[JsonProperty(PropertyName = "num_reduce_phases")]
150+
public long NumberOfReducePhases { get; internal set; }
151+
143152
[JsonIgnore]
144153
public long Total => this.HitsMetaData?.Total ?? 0;
145154

0 commit comments

Comments
 (0)