Skip to content

Commit 8f69c87

Browse files
committed
Rename ElasticClient -> ElasticsearchClient
1 parent c2559d1 commit 8f69c87

File tree

64 files changed

+162
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+162
-318
lines changed

.github/auto-label.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"rules": {
33
"Infra": [".ci/**/*", ".github/**/*","build/**/*"],
4-
"v8.0.0-alpha1": "**/*"
4+
"v8.0.0-alpha.1": "**/*"
55
}
66
}

Elasticsearch.sln

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
4646
EndProject
4747
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch", "src\Elastic.Clients.Elasticsearch\Elastic.Clients.Elasticsearch.csproj", "{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}"
4848
EndProject
49-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlaygroundFx", "src\PlaygroundFx\PlaygroundFx.csproj", "{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}"
50-
EndProject
5149
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tooling", "tooling", "{1FE49D14-216A-41EE-A177-E42BFF53E0DC}"
5250
EndProject
5351
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "scripts", "build\scripts\scripts.fsproj", "{68D1BFDC-F447-4D2C-AF81-537807636610}"
@@ -174,18 +172,6 @@ Global
174172
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|x64.Build.0 = Release|Any CPU
175173
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|x86.ActiveCfg = Release|Any CPU
176174
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|x86.Build.0 = Release|Any CPU
177-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
178-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Debug|Any CPU.Build.0 = Debug|Any CPU
179-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Debug|x64.ActiveCfg = Debug|Any CPU
180-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Debug|x64.Build.0 = Debug|Any CPU
181-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Debug|x86.ActiveCfg = Debug|Any CPU
182-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Debug|x86.Build.0 = Debug|Any CPU
183-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Release|Any CPU.ActiveCfg = Release|Any CPU
184-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Release|Any CPU.Build.0 = Release|Any CPU
185-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Release|x64.ActiveCfg = Release|Any CPU
186-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Release|x64.Build.0 = Release|Any CPU
187-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Release|x86.ActiveCfg = Release|Any CPU
188-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10}.Release|x86.Build.0 = Release|Any CPU
189175
{68D1BFDC-F447-4D2C-AF81-537807636610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
190176
{68D1BFDC-F447-4D2C-AF81-537807636610}.Debug|Any CPU.Build.0 = Debug|Any CPU
191177
{68D1BFDC-F447-4D2C-AF81-537807636610}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -236,7 +222,6 @@ Global
236222
{7141AB85-10C5-42AE-8FC7-B14A4216A89F} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
237223
{5222D7CD-3663-49ED-98EA-4B5ECDF705BF} = {B7B8819B-3197-4AB6-B61B-9E1BFD1EC302}
238224
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
239-
{11362CEE-B4B3-4EFE-A9A1-A6CDEEFCEA10} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
240225
{68D1BFDC-F447-4D2C-AF81-537807636610} = {1FE49D14-216A-41EE-A177-E42BFF53E0DC}
241226
{F6162603-D134-4121-8106-2BA4DAD7350B} = {362B2776-4B29-46AB-B237-56776B5372B6}
242227
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}

benchmarks/Benchmarks/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class SerialisePolymorphic
2323
{
2424

2525
private readonly AggregationContainer _container1 = new AggregationContainer(new MinAggregation("testing"));
26-
private readonly ElasticClient _client = new ElasticClient();
26+
private readonly ElasticsearchClient _client = new ElasticsearchClient();
2727

2828

2929
private readonly Stream _stream = new MemoryStream();

build/scripts/Versioning.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ module Versioning =
146146
let ciArgs =
147147
let appVeyor = Environment.hasEnvironVar "APPVEYOR"
148148
let azDevops = Environment.hasEnvironVar "TF_BUILD"
149-
if appVeyor || azDevops then ["-r"; "true"] else []
149+
if true || azDevops then ["-r"; "true"] else []
150150
ReposTooling.PackageValidator
151151
<| [p.Package; "-v"; v; "-a"; p.AssemblyName; "-k"; officialToken] @ ciArgs
152152
|> ignore

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You can connect to your Elasticsearch cluster via a single node, or by specifyin
140140
```csharp
141141
var node = new Uri("http://myserver:9200");
142142
var settings = new ConnectionSettings(node);
143-
var client = new ElasticClient(settings);
143+
var client = new ElasticsearchClient(settings);
144144
```
145145

146146
**Connecting to multiple nodes using a connection pool**
@@ -155,7 +155,7 @@ var nodes = new Uri[]
155155

156156
var pool = new StaticNodePool(nodes);
157157
var settings = new ConnectionSettings(pool);
158-
var client = new ElasticClient(settings);
158+
var client = new ElasticsearchClient(settings);
159159
```
160160

161161
### Indexing
@@ -270,7 +270,7 @@ var config = new ConnectionConfiguration(node);
270270
var client = new ElasticLowLevelClient(config);
271271
```
272272

273-
Note the main difference here is that we are instantiating an `ElasticLowLevelClient` rather than `ElasticClient`, and `ConnectionConfiguration` instead of `ConnectionSettings`.
273+
Note the main difference here is that we are instantiating an `ElasticLowLevelClient` rather than `ElasticsearchClient`, and `ConnectionConfiguration` instead of `ConnectionSettings`.
274274

275275
### Calling an API endpoint
276276

src/Elastic.Clients.Elasticsearch/Client/ElasticClient-BulkAll.cs renamed to src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-BulkAll.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace Elastic.Clients.Elasticsearch;
1111

12-
public partial interface IElasticClient
12+
public partial interface IElasticsearchClient
1313
{
1414
//HelpersNamespace Helpers { get; }
1515

@@ -18,7 +18,7 @@ public partial interface IElasticClient
1818
BulkAllObservable<T> BulkAll<T>(IBulkAllRequest<T> request, CancellationToken cancellationToken = default);
1919
}
2020

21-
public partial class ElasticClient
21+
public partial class ElasticsearchClient
2222
{
2323
//public HelpersNamespace Helpers { get; private set; }
2424

@@ -35,9 +35,9 @@ public BulkAllObservable<T> BulkAll<T>(IBulkAllRequest<T> request, CancellationT
3535

3636
//public class HelpersNamespace : NamespacedClientProxy
3737
//{
38-
// private readonly ElasticClient _client;
38+
// private readonly ElasticsearchClient _client;
3939

40-
// internal HelpersNamespace(ElasticClient client) : base(client) => _client = client;
40+
// internal HelpersNamespace(ElasticsearchClient client) : base(client) => _client = client;
4141

4242
// public BulkAllObservable<T> BulkAllObservable<T>(IEnumerable<T> documents, Action<BulkAllRequestDescriptor<T>> configure, CancellationToken cancellationToken = default)
4343
// {

src/Elastic.Clients.Elasticsearch/Client/ElasticClient.cs renamed to src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@
1111
namespace Elastic.Clients.Elasticsearch;
1212

1313
/// <inheritdoc />
14-
public partial class ElasticClient
14+
public partial class ElasticsearchClient
1515
{
1616
private readonly ITransport<IElasticsearchClientSettings> _transport;
1717

1818
/// <summary>
1919
/// Creates a client configured to connect to localhost:9200.
2020
/// </summary>
21-
public ElasticClient() : this(new ElasticsearchClientSettings(new Uri("http://localhost:9200"))) { }
21+
public ElasticsearchClient() : this(new ElasticsearchClientSettings(new Uri("http://localhost:9200"))) { }
2222

2323
/// <summary>
2424
/// Creates a client configured to connect to a node reachable at the provided <paramref name="uri" />.
2525
/// </summary>
2626
/// <param name="uri">The <see cref="Uri" /> to connect to.</param>
27-
public ElasticClient(Uri uri) : this(new ElasticsearchClientSettings(uri)) { }
27+
public ElasticsearchClient(Uri uri) : this(new ElasticsearchClientSettings(uri)) { }
2828

2929
/// <summary>
3030
/// Creates a client configured to communicate with Elastic Cloud using the provided <paramref name="cloudId" />.
3131
/// <para>See the <see cref="CloudNodePool" /> documentation for more information on how to obtain your Cloud Id.</para>
3232
/// <para>
33-
/// If you want more control, use the <see cref="ElasticClient(IElasticsearchClientSettings)" /> constructor and
33+
/// If you want more control, use the <see cref="ElasticsearchClient(IElasticsearchClientSettings)" /> constructor and
3434
/// pass
3535
/// an instance of
3636
/// <see cref="ElasticsearchClientSettings" /> that takes a <paramref name="cloudId" /> in its constructor as well.
3737
/// </para>
3838
/// </summary>
3939
/// <param name="cloudId">The Cloud ID of an Elastic Cloud deployment.</param>
4040
/// <param name="credentials">The credentials to use for the connection.</param>
41-
public ElasticClient(string cloudId, IAuthenticationHeader credentials) : this(
41+
public ElasticsearchClient(string cloudId, IAuthenticationHeader credentials) : this(
4242
new ElasticsearchClientSettings(cloudId, credentials))
4343
{
4444
}
@@ -47,7 +47,7 @@ public ElasticClient(string cloudId, IAuthenticationHeader credentials) : this(
4747
/// TODO
4848
/// </summary>
4949
/// <param name="elasticsearchClientSettings"></param>
50-
public ElasticClient(IElasticsearchClientSettings elasticsearchClientSettings)
50+
public ElasticsearchClient(IElasticsearchClientSettings elasticsearchClientSettings)
5151
: this(new Transport<IElasticsearchClientSettings>(elasticsearchClientSettings))
5252
{
5353
}
@@ -56,7 +56,7 @@ public ElasticClient(IElasticsearchClientSettings elasticsearchClientSettings)
5656
/// TODO
5757
/// </summary>
5858
/// <param name="transport"></param>
59-
public ElasticClient(ITransport<IElasticsearchClientSettings> transport)
59+
public ElasticsearchClient(ITransport<IElasticsearchClientSettings> transport)
6060
{
6161
transport.ThrowIfNull(nameof(transport));
6262
transport.Settings.ThrowIfNull(nameof(transport.Settings));

src/Elastic.Clients.Elasticsearch/Client/IElasticClient.cs renamed to src/Elastic.Clients.Elasticsearch/Client/IElasticsearchClient.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
15
using Elastic.Transport;
26

37
namespace Elastic.Clients.Elasticsearch
48
{
59
/// <summary>
6-
/// ElasticClient is Elastic.Clients.Elasticsearch's strongly typed client which exposes fully mapped Elasticsearch endpoints.
10+
/// ElasticsearchClient is Elastic.Clients.Elasticsearch's strongly typed client which exposes fully mapped Elasticsearch endpoints.
711
/// </summary>
812
/// <remarks>
913
/// It is generally expected to be used as a singleton instance for the lifetime of the host application.
1014
/// </remarks>
11-
public partial interface IElasticClient
15+
public partial interface IElasticsearchClient
1216
{
1317
/// <summary>
1418
/// The configured connection settings for the client.

src/Elastic.Clients.Elasticsearch/Client/IndexManyExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static class IndexManyExtensions
2424
/// <param name="objects">List of objects to index, Id will be inferred (Id property or IdProperty attribute on type)</param>
2525
/// <param name="index">Override the inferred indexname for T</param>
2626
/// <param name="type">Override the inferred typename for T</param>
27-
public static BulkResponse IndexMany<T>(this IElasticClient client, IEnumerable<T> @objects, IndexName index = null)
27+
public static BulkResponse IndexMany<T>(this IElasticsearchClient client, IEnumerable<T> @objects, IndexName index = null)
2828
where T : class
2929
{
3030
var bulkRequest = CreateIndexBulkRequest(objects, index);
@@ -41,7 +41,7 @@ public static BulkResponse IndexMany<T>(this IElasticClient client, IEnumerable<
4141
/// <param name="objects">List of objects to index, Id will be inferred (Id property or IdProperty attribute on type)</param>
4242
/// <param name="index">Override the inferred indexname for T</param>
4343
/// <param name="type">Override the inferred typename for T</param>
44-
public static Task<BulkResponse> IndexManyAsync<T>(this IElasticClient client, IEnumerable<T> objects, IndexName index = null,
44+
public static Task<BulkResponse> IndexManyAsync<T>(this IElasticsearchClient client, IEnumerable<T> objects, IndexName index = null,
4545
CancellationToken cancellationToken = default
4646
)
4747
where T : class

src/Elastic.Clients.Elasticsearch/Client/NamespacedClientProxy.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
15
using System;
26
using System.Threading;
37
using System.Threading.Tasks;
48
using Elastic.Transport;
5-
using Elastic.Transport.Products.Elasticsearch;
69

710
namespace Elastic.Clients.Elasticsearch
811
{
@@ -13,9 +16,9 @@ namespace Elastic.Clients.Elasticsearch
1316
/// </remarks>
1417
public class NamespacedClientProxy
1518
{
16-
private readonly ElasticClient _client;
19+
private readonly ElasticsearchClient _client;
1720

18-
protected NamespacedClientProxy(ElasticClient client) => _client = client;
21+
protected NamespacedClientProxy(ElasticsearchClient client) => _client = client;
1922

2023
internal TResponse DoRequest<TRequest, TResponse>(
2124
TRequest request,

0 commit comments

Comments
 (0)