Skip to content

Commit cd23a5d

Browse files
Rename IndexManagement client method to Indices (#6252) (#6253)
Co-authored-by: Steve Gordon <[email protected]>
1 parent b9710c1 commit cd23a5d

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private void RefreshOnCompleted()
103103
if (rc is not null)
104104
request.RequestConfiguration = new RequestConfiguration { RequestMetaData = rc };
105105

106-
var refresh = _client.IndexManagement.Refresh(request);
106+
var refresh = _client.Indices.Refresh(request);
107107

108108
if (!refresh.IsValid)
109109
throw Throw($"Refreshing after all documents have indexed failed", refresh.ApiCall);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
#nullable restore
2323
namespace Elastic.Clients.Elasticsearch.IndexManagement
2424
{
25-
public class IndexManagementNamespace : NamespacedClientProxy
25+
public class IndicesNamespace : NamespacedClientProxy
2626
{
27-
internal IndexManagementNamespace(ElasticsearchClient client) : base(client)
27+
internal IndicesNamespace(ElasticsearchClient client) : base(client)
2828
{
2929
}
3030

src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public partial class ElasticsearchClient
5252

5353
public IlmNamespace Ilm { get; private set; }
5454

55-
public IndexManagementNamespace IndexManagement { get; private set; }
55+
public IndicesNamespace Indices { get; private set; }
5656

5757
public IngestNamespace Ingest { get; private set; }
5858

@@ -75,7 +75,7 @@ private partial void SetupNamespaces()
7575
Eql = new EqlNamespace(this);
7676
Graph = new GraphNamespace(this);
7777
Ilm = new IlmNamespace(this);
78-
IndexManagement = new IndexManagementNamespace(this);
78+
Indices = new IndicesNamespace(this);
7979
Ingest = new IngestNamespace(this);
8080
Nodes = new NodesNamespace(this);
8181
SearchableSnapshots = new SearchableSnapshotsNamespace(this);

tests/Tests.Core/ManagedElasticsearch/NodeSeeders/DefaultSeeder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ public async Task DeleteIndicesAndTemplatesAsync(bool alreadySeeded)
154154
{
155155
var tasks = new List<Task>
156156
{
157-
Client.IndexManagement.DeleteAsync(typeof(Project)),
158-
Client.IndexManagement.DeleteAsync(typeof(Developer)),
159-
Client.IndexManagement.DeleteAsync(typeof(ProjectPercolation))
157+
Client.Indices.DeleteAsync(typeof(Project)),
158+
Client.Indices.DeleteAsync(typeof(Developer)),
159+
Client.Indices.DeleteAsync(typeof(ProjectPercolation))
160160
};
161161

162162
if (alreadySeeded)
@@ -422,7 +422,7 @@ private async Task SeedIndexDataAsync()
422422

423423
await Task.WhenAll(tasks).ConfigureAwait(false);
424424

425-
await Client.IndexManagement.RefreshAsync(new RefreshRequest(Indices.Index(typeof(Project)))).ConfigureAwait(false);
425+
await Client.Indices.RefreshAsync(new RefreshRequest(Indices.Index(typeof(Project)))).ConfigureAwait(false);
426426
}
427427

428428
// private Task<PutIndexTemplateResponse> CreateIndexTemplateAsync() => Client.Indices.PutTemplateAsync(

0 commit comments

Comments
 (0)