Skip to content

Commit 3dbafb0

Browse files
committed
Merge remote-tracking branch 'remotes/origin/8.17' into 8.18
2 parents 98fa198 + a170ce5 commit 3dbafb0

File tree

2,899 files changed

+117274
-415377
lines changed

Some content is hidden

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

2,899 files changed

+117274
-415377
lines changed

.github/workflows/docfx.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: 'CD'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
target_branch:
7+
description: 'The target branch to which the documentation should be pushed to.'
8+
type: 'string'
9+
required: true
10+
name:
11+
description: 'The name to use for the documentation folder (defaults to the name of the current ref)'
12+
type: 'string'
13+
required: false
14+
default: ${{ github.ref_name }}
15+
16+
concurrency:
17+
group: 'docfx'
18+
cancel-in-progress: false
19+
20+
env:
21+
# Configuration
22+
GLOBAL_JSON_FILE: 'global.json'
23+
CACHE_PATTERNS: '["**/*.[cf]sproj*", "**/*.Build.props"]'
24+
# .NET SDK related environment variables
25+
DOTNET_NOLOGO: 1
26+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
27+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
28+
DOTNET_GENERATE_ASPNET_CERTIFICATE: 0
29+
30+
jobs:
31+
docfx:
32+
name: 'DocFx'
33+
runs-on: 'ubuntu-latest'
34+
steps:
35+
- name: 'Checkout'
36+
uses: 'actions/checkout@v4'
37+
38+
- name: '.NET Setup'
39+
uses: 'actions/setup-dotnet@v4'
40+
with:
41+
global-json-file: '${{ github.workspace }}/${{ env.GLOBAL_JSON_FILE }}'
42+
43+
- name: 'DocFX Setup'
44+
run: |-
45+
dotnet tool update -g docfx
46+
47+
# TODO: Remove 'stack'
48+
- name: '.NET Cache Packages'
49+
uses: 'actions/cache@v4'
50+
with:
51+
path: '~/.nuget/packages'
52+
key: '${{ runner.os }}-nuget-stack-${{ hashFiles(fromJson(env.CACHE_PATTERNS)) }}'
53+
restore-keys: '${{ runner.os }}-nuget-stack-'
54+
55+
- name: 'DocFx Build'
56+
working-directory: 'docfx'
57+
run: |-
58+
docfx docfx.json
59+
mv ./_site ./../..
60+
61+
- name: 'Checkout'
62+
uses: 'actions/checkout@v4'
63+
with:
64+
ref: ${{ inputs.target_branch }}
65+
66+
- name: 'Commit'
67+
run: |-
68+
rm -r "./${{ inputs.name }}" || true
69+
mv ../_site "./${{ inputs.name }}"
70+
git config --global user.name '${{ github.actor }}'
71+
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
72+
git add -A
73+
git commit -am "Add ${{ inputs.name }}"
74+
git push

.github/workflows/docfx_manual.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 'DocFx'
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
docfx:
8+
name: 'DocFx'
9+
uses: ./.github/workflows/docfx.yml
10+
with:
11+
target_branch: 'refdoc'
12+
secrets: 'inherit'

.github/workflows/release_stack.yml

+9
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ jobs:
1616
release_tag: ${{ github.event.release.tag_name }}
1717
release_body: ${{ github.event.release.body }}
1818
secrets: 'inherit'
19+
20+
docfx:
21+
name: 'DocFx'
22+
if: ${{ !startsWith(github.event.release.tag_name, 'serverless-') }}
23+
uses: ./.github/workflows/docfx.yml
24+
with:
25+
name: ${{ github.event.release.tag_name }}
26+
target_branch: 'refdoc'
27+
secrets: 'inherit'

Elasticsearch.sln

+6-21
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{362B2776
1515
tests\Directory.Build.props = tests\Directory.Build.props
1616
EndProjectSection
1717
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "tests\Tests\Tests.csproj", "{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}"
19-
EndProject
2018
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Core", "tests\Tests.Core\Tests.Core.csproj", "{70225C3F-393A-40F5-A778-8FF71A38C4C0}"
2119
EndProject
2220
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Configuration", "tests\Tests.Configuration\Tests.Configuration.csproj", "{587DE66B-6FAB-4722-9C53-2812BEFB6A44}"
@@ -59,7 +57,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.ClusterLauncher", "te
5957
EndProject
6058
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch.JsonNetSerializer", "src\Elastic.Clients.Elasticsearch.JsonNetSerializer\Elastic.Clients.Elasticsearch.JsonNetSerializer.csproj", "{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}"
6159
EndProject
62-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch.Serverless", "src\Elastic.Clients.Elasticsearch.Serverless\Elastic.Clients.Elasticsearch.Serverless.csproj", "{49D7F5A7-AA32-492B-B957-0E3325861F55}"
60+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "tests\Tests\Tests.csproj", "{6FD804B2-CE80-41CB-A411-2023F34C18FE}"
6361
EndProject
6462
Global
6563
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -71,18 +69,6 @@ Global
7169
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
7270
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
7371
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}.Release|Any CPU.Build.0 = Release|Any CPU
74-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
76-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Debug|x64.ActiveCfg = Debug|Any CPU
77-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Debug|x64.Build.0 = Debug|Any CPU
78-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Debug|x86.ActiveCfg = Debug|Any CPU
79-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Debug|x86.Build.0 = Debug|Any CPU
80-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
81-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Release|Any CPU.Build.0 = Release|Any CPU
82-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Release|x64.ActiveCfg = Release|Any CPU
83-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Release|x64.Build.0 = Release|Any CPU
84-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Release|x86.ActiveCfg = Release|Any CPU
85-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E}.Release|x86.Build.0 = Release|Any CPU
8672
{70225C3F-393A-40F5-A778-8FF71A38C4C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
8773
{70225C3F-393A-40F5-A778-8FF71A38C4C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
8874
{70225C3F-393A-40F5-A778-8FF71A38C4C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -119,17 +105,16 @@ Global
119105
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
120106
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Release|Any CPU.ActiveCfg = Release|Any CPU
121107
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB}.Release|Any CPU.Build.0 = Release|Any CPU
122-
{49D7F5A7-AA32-492B-B957-0E3325861F55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
123-
{49D7F5A7-AA32-492B-B957-0E3325861F55}.Debug|Any CPU.Build.0 = Debug|Any CPU
124-
{49D7F5A7-AA32-492B-B957-0E3325861F55}.Release|Any CPU.ActiveCfg = Release|Any CPU
125-
{49D7F5A7-AA32-492B-B957-0E3325861F55}.Release|Any CPU.Build.0 = Release|Any CPU
108+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
109+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
110+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
111+
{6FD804B2-CE80-41CB-A411-2023F34C18FE}.Release|Any CPU.Build.0 = Release|Any CPU
126112
EndGlobalSection
127113
GlobalSection(SolutionProperties) = preSolution
128114
HideSolutionNode = FALSE
129115
EndGlobalSection
130116
GlobalSection(NestedProjects) = preSolution
131117
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
132-
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E} = {362B2776-4B29-46AB-B237-56776B5372B6}
133118
{70225C3F-393A-40F5-A778-8FF71A38C4C0} = {362B2776-4B29-46AB-B237-56776B5372B6}
134119
{587DE66B-6FAB-4722-9C53-2812BEFB6A44} = {362B2776-4B29-46AB-B237-56776B5372B6}
135120
{0B4DCA79-10CC-4CB8-95D3-A4EB8C98BE1C} = {362B2776-4B29-46AB-B237-56776B5372B6}
@@ -139,7 +124,7 @@ Global
139124
{68D1BFDC-F447-4D2C-AF81-537807636610} = {1FE49D14-216A-41EE-A177-E42BFF53E0DC}
140125
{F6162603-D134-4121-8106-2BA4DAD7350B} = {362B2776-4B29-46AB-B237-56776B5372B6}
141126
{8C9275D9-29CE-4A20-8FD5-6B26C6CAAADB} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
142-
{49D7F5A7-AA32-492B-B957-0E3325861F55} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
127+
{6FD804B2-CE80-41CB-A411-2023F34C18FE} = {362B2776-4B29-46AB-B237-56776B5372B6}
143128
EndGlobalSection
144129
GlobalSection(ExtensibilityGlobals) = postSolution
145130
SolutionGuid = {CE74F821-B001-4C69-A58D-CF81F8B0B632}

Packages.Serverless.slnf

-8
This file was deleted.

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Please refer to
5858
[the full documentation on elastic.co](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/index.html)
5959
for comprehensive information on installation, configuration and usage.
6060

61+
The API reference documentation is available [here](https://elastic.github.io/elasticsearch-net).
62+
6163
## Versions
6264

6365
### Elasticsearch 8.x Clusters

docfx/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_site
2+
api

docfx.json renamed to docfx/docfx.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
{
44
"src": [
55
{
6-
"src": "./src/Elastic.Clients.Elasticsearch",
6+
"src": "../src",
77
"files": [
8-
"**/*.csproj"
8+
"**/Elastic.Clients.Elasticsearch.csproj"
99
]
1010
}
1111
],
@@ -38,6 +38,7 @@
3838
"globalMetadata": {
3939
"_appName": "Elasticsearch.NET",
4040
"_appTitle": "Elasticsearch.NET",
41+
"_appLogoPath": "images/logo.svg",
4142
"_enableSearch": true,
4243
"_disableContribution": true,
4344
"pdf": false

docfx/images/logo.svg

+16
Loading

docfx/index.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
_layout: landing
3+
---
4+
5+
# Elasticsearch .NET API
6+
7+
This is the home of the Elasticsearch .NET Client API Reference Documentation.
8+
9+
Please click on `API` in the top menu to get to the API overview.

docfx/toc.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- name: API
2+
href: api/

docs/getting-started.asciidoc

+8-9
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,21 @@ Refer to the <<installation>> page to learn more.
2626
[discrete]
2727
=== Connecting
2828

29-
You can connect to the Elastic Cloud using an API key and the Elasticsearch
30-
endpoint.
29+
You can connect to the Elastic Cloud using an API key and your Elasticsearch
30+
Cloud ID.
3131

3232
[source,net]
3333
----
3434
var client = new ElasticsearchClient("<CLOUD_ID>", new ApiKey("<API_KEY>"));
3535
----
3636

37-
Your Elasticsearch endpoint can be found on the **My deployment** page of your
38-
deployment:
37+
You can find your Elasticsearch Cloud ID on the deployment page:
3938

40-
image::images/es-endpoint.jpg[alt="Finding Elasticsearch endpoint",align="center"]
39+
image::images/es-cloudid.jpg[alt="Cloud ID on the deployment page",align="center"]
4140

42-
You can generate an API key on the **Management** page under Security.
43-
44-
image::images/create-api-key.png[alt="Create API key",align="center"]
41+
To generate an API key, use the
42+
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html[Elasticsearch Create API key API]
43+
or https://www.elastic.co/guide/en/kibana/current/api-keys.html#create-api-key[Kibana Stack Management].
4544

4645
For other connection options, refer to the <<connecting>> section.
4746

@@ -158,4 +157,4 @@ var response = await client.Indices.DeleteAsync("my_index");
158157
== Further reading
159158

160159
* Refer to the <<recommendations>> page to learn more about how to use the
161-
client the most efficiently.
160+
client the most efficiently.

docs/images/es-cloudid.jpg

323 KB
Loading

docs/migration-guide.asciidoc

+38-8
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,43 @@ As a last resort, the low-level client `Elastic.Transport` can be used to create
292292

293293
[source,csharp]
294294
----
295+
public class MyRequestParameters : RequestParameters
296+
{
297+
public bool Pretty
298+
{
299+
get => Q<bool>("pretty");
300+
init => Q("pretty", value);
301+
}
302+
}
303+
304+
// ...
305+
295306
var body = """
296-
{
297-
"name": "my-api-key",
298-
"expiration": "1d",
299-
"...": "..."
300-
}
301-
""";
302-
303-
var response = await client.Transport.RequestAsync<StringResponse>(HttpMethod.POST, "/_security/api_key", PostData.String(body));
307+
{
308+
"name": "my-api-key",
309+
"expiration": "1d",
310+
"...": "..."
311+
}
312+
""";
313+
314+
MyRequestParameters requestParameters = new()
315+
{
316+
Pretty = true
317+
};
318+
319+
var pathAndQuery = requestParameters.CreatePathWithQueryStrings("/_security/api_key",
320+
client.ElasticsearchClientSettings);
321+
var endpointPath = new EndpointPath(Elastic.Transport.HttpMethod.POST, pathAndQuery);
322+
323+
// Or, if the path does not contain query parameters:
324+
// new EndpointPath(Elastic.Transport.HttpMethod.POST, "my_path")
325+
326+
var response = await client.Transport
327+
.RequestAsync<StringResponse>(
328+
endpointPath,
329+
PostData.String(body),
330+
null,
331+
null,
332+
cancellationToken: default)
333+
.ConfigureAwait(false);
304334
----

docs/usage/index.asciidoc

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The sections below provide tutorials on the most frequently used and some less o
66

77
For a full reference, see the {ref}/[Elasticsearch documentation] and in particular the {ref}/rest-apis.html[REST APIs] section. The {net-client} follows closely the JSON structures described there.
88

9+
A .NET API reference documentation for the Elasticsearch client package is available https://elastic.github.io/elasticsearch-net[here].
10+
911
If you're new to {es}, make sure also to read {ref}/getting-started.html[Elasticsearch's quick start] that provides a good introduction.
1012

1113
* <<recommendations, Usage recommendations>>
@@ -14,9 +16,10 @@ If you're new to {es}, make sure also to read {ref}/getting-started.html[Elastic
1416

1517
NOTE: This is still a work in progress, more sections will be added in the near future.
1618

17-
include::recommendations.asciidoc[]
19+
include::aggregations.asciidoc[]
20+
include::esql.asciidoc[]
1821
include::examples.asciidoc[]
19-
include::query.asciidoc[]
2022
include::mappings.asciidoc[]
21-
include::aggregations.asciidoc[]
22-
include::esql.asciidoc[]
23+
include::query.asciidoc[]
24+
include::recommendations.asciidoc[]
25+
include::transport.asciidoc[]

0 commit comments

Comments
 (0)