Skip to content

Commit 705e462

Browse files
Add changelog for 8.18 (#1001) (#1003)
Co-authored-by: Laurent Saint-Félix <[email protected]>
1 parent 3283832 commit 705e462

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,65 @@
1+
# 8.18.0
2+
3+
* Update `elastictransport` to `8.7.0`.
4+
* Thanks to @zaneli, the `TypedClient` can now be used in the `BulkIndexer`.
5+
6+
# New
7+
8+
* This release adds a `BaseClient` constructor with no attached APIs, allowing it to be used purely as a transport layer instead of a full-featured API client.
9+
10+
```go
11+
baseClient, err := elasticsearch.NewBaseClient(elasticsearch.Config{
12+
Addresses: []string{
13+
"http://localhost:9200",
14+
},
15+
})
16+
17+
if err != nil {
18+
log.Println(err)
19+
return
20+
}
21+
22+
res, err := esapi.InfoRequest{
23+
Pretty: false,
24+
Human: false,
25+
ErrorTrace: false,
26+
FilterPath: nil,
27+
Header: nil,
28+
Instrument: baseClient.InstrumentationEnabled(),
29+
}.Do(context.Background(), baseClient)
30+
31+
if err != nil {
32+
log.Println(err)
33+
return
34+
}
35+
defer res.Body.Close()
36+
if res.IsError() {
37+
log.Println("Error response:", res)
38+
return
39+
}
40+
var infoMap map[string]interface{}
41+
if err := json.NewDecoder(res.Body).Decode(&infoMap); err != nil {
42+
log.Println("Error parsing response:", err)
43+
return
44+
}
45+
log.Printf("Elasticsearch version esapi: %s\n", infoMap["version"].(map[string]interface{})["number"])
46+
47+
typedRes, err := info.New(baseClient).Do(context.Background())
48+
if err != nil {
49+
log.Println(err)
50+
return
51+
}
52+
log.Printf("Elasticsearch version typedapi: %s\n", typedRes.Version.Int)
53+
```
54+
55+
# API
56+
57+
* Updated APIs to 8.18.0
58+
59+
# Typed API
60+
61+
* Update APIs to 8.18 ([cbfcc73](https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5))
62+
163
# 8.17.1
264

365
* Update elastictransport to 8.6.1

0 commit comments

Comments
 (0)