Skip to content

Commit de984dc

Browse files
committed
Align types in files with the project convention
1 parent d5bcaaa commit de984dc

File tree

5 files changed

+60
-45
lines changed

5 files changed

+60
-45
lines changed

src/Nest/Document/Multiple/Reindex/ElasticClient-Reindex.cs

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,44 @@ namespace Nest
44
{
55
public partial interface IElasticClient
66
{
7-
/// <summary>
8-
/// Helper method that allows you to reindex from one index into another using SCAN and SCROLL.
9-
/// </summary>
10-
/// <returns>An IObservable you can subscribe to to listen to the progress of the reindexation process</returns>
11-
IObservable<IReindexResponse<T>> Reindex<T>(IndexName from, IndexName to, Func<ReindexDescriptor<T>, IReindexRequest> selector = null)
7+
/// <summary>
8+
/// Helper method that allows you to reindex from one index into another using SCAN and SCROLL.
9+
/// </summary>
10+
/// <param name="from">the index that documents should be reindexed from</param>
11+
/// <param name="to">the index that documents should be reindexed to</param>
12+
/// <param name="selector">the descriptor to describe the reindex operation</param>
13+
/// <returns>An IObservable&lt;IReindexResponse&lt;T&gt;$gt; you can subscribe to to listen to the progress of the reindex process</returns>
14+
IObservable<IReindexResponse<T>> Reindex<T>(IndexName from, IndexName to, Func<ReindexDescriptor<T>, IReindexRequest> selector = null)
1215
where T : class;
1316

14-
/// <inheritdoc/>
15-
IObservable<IReindexResponse<T>> Reindex<T>(IReindexRequest reindexRequest) where T : class;
17+
/// <summary>
18+
/// Helper method that allows you to reindex from one index into another using SCAN and SCROLL.
19+
/// </summary>
20+
/// <param name="request">a request object to describe the reindex operation</param>
21+
/// <returns>An IObservable&lt;IReindexResponse&lt;T&gt;$gt; you can subscribe to to listen to the progress of the reindex process</returns>
22+
IObservable<IReindexResponse<T>> Reindex<T>(IReindexRequest request) where T : class;
1623
}
1724

1825
public partial class ElasticClient
1926
{
20-
/// <inheritdoc/>
21-
public IObservable<IReindexResponse<T>> Reindex<T>(IndexName from, IndexName to, Func<ReindexDescriptor<T>, IReindexRequest> selector = null)
27+
/// <summary>
28+
/// Helper method that allows you to reindex from one index into another using SCAN and SCROLL.
29+
/// </summary>
30+
/// <param name="from">the index that documents should be reindexed from</param>
31+
/// <param name="to">the index that documents should be reindexed to</param>
32+
/// <param name="selector">the descriptor to describe the reindex operation</param>
33+
/// <returns>An IObservable&lt;IReindexResponse&lt;T&gt;$gt; you can subscribe to to listen to the progress of the reindex process</returns>
34+
public IObservable<IReindexResponse<T>> Reindex<T>(IndexName from, IndexName to, Func<ReindexDescriptor<T>, IReindexRequest> selector = null)
2235
where T : class =>
2336
this.Reindex<T>(selector.InvokeOrDefault(new ReindexDescriptor<T>(from, to)));
2437

25-
/// <inheritdoc/>
26-
public IObservable<IReindexResponse<T>> Reindex<T>(IReindexRequest reindexRequest)
38+
/// <summary>
39+
/// Helper method that allows you to reindex from one index into another using SCAN and SCROLL.
40+
/// </summary>
41+
/// <param name="request">a request object to describe the reindex operation</param>
42+
/// <returns>An IObservable&lt;IReindexResponse&lt;T&gt;$gt; you can subscribe to to listen to the progress of the reindex process</returns>
43+
public IObservable<IReindexResponse<T>> Reindex<T>(IReindexRequest request)
2744
where T : class =>
28-
new ReindexObservable<T>(this, ConnectionSettings, reindexRequest);
45+
new ReindexObservable<T>(this, ConnectionSettings, request);
2946
}
3047
}

src/Nest/Document/Multiple/Reindex/IReindexResponse.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/Nest/Document/Multiple/Reindex/ReindexObservable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public IBulkResponse IndexSearchResults(ISearchResponse<T> searchResult,IObserve
9090
bb.Index<T>(bi => Index(bi, d1, toIndex));
9191
}
9292

93-
var indexResult = this._client.Bulk(b=>bb);
93+
var indexResult = this._client.Bulk(bb);
9494
if (!indexResult.IsValid)
9595
throw new ElasticsearchClientException(PipelineFailure.BadResponse, $"Failed indexing page {page}.", indexResult.ApiCall);
9696

src/Nest/Document/Multiple/Reindex/ReindexResponse.cs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,36 @@
22

33
namespace Nest
44
{
5-
/// <summary>
6-
/// POCO representing the reindex response for a each step
7-
/// </summary>
8-
[JsonObject]
5+
/// <summary>
6+
/// The reindex response for a reindexing step
7+
/// </summary>
8+
public interface IReindexResponse<T> where T : class
9+
{
10+
/// <summary>
11+
/// The bulk result indexing the search results into the new index.
12+
/// </summary>
13+
IBulkResponse BulkResponse { get; }
14+
15+
/// <summary>
16+
/// The scroll result
17+
/// </summary>
18+
ISearchResponse<T> SearchResponse { get; }
19+
20+
/// <summary>
21+
/// The no of scroll this result represents
22+
/// </summary>
23+
int Scroll { get; }
24+
25+
/// <summary>
26+
/// Whether both the scroll and reindex result are valid
27+
/// </summary>
28+
bool IsValid { get; }
29+
}
30+
31+
/// <summary>
32+
/// POCO representing the reindex response for a each step
33+
/// </summary>
34+
[JsonObject]
935
public class ReindexResponse<T> : IReindexResponse<T> where T : class
1036
{
1137
public IBulkResponse BulkResponse { get; internal set; }

0 commit comments

Comments
 (0)