Skip to content

Commit 1ba07a2

Browse files
committed
HSEARCH-5464 Clarify a few points in the docs
1 parent 68c6fab commit 1ba07a2

File tree

2 files changed

+48
-13
lines changed

2 files changed

+48
-13
lines changed

documentation/src/main/asciidoc/migration/index.adoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ are the same as those of Hibernate Search {hibernateSearchPreviousStableVersionS
5353
The coordinates of Maven artifacts in Hibernate Search {hibernateSearchVersion}
5454
are the same as in Hibernate Search {hibernateSearchPreviousStableVersionShort}.
5555

56+
A few new artifacts are introduced with this version. They are for the pluggable Elasticsearch backend REST clients.
57+
While for now, the Elasticsearch backend brings the default (Elasticsearch low level client (based on Apache HTTP client 4))
58+
dependency automatically, it is recommended to explicitly specify the client dependency you want to use moving forward.
59+
Currently available options are:
60+
61+
* `org.hibernate.search:hibernate-search-backend-elasticsearch-client-rest4` backed by `org.elasticsearch.client:elasticsearch-rest-client`
62+
* `org.hibernate.search:hibernate-search-backend-elasticsearch-client-rest5` backed by `co.elastic.clients:elasticsearch-rest5-client`
63+
* `org.hibernate.search:hibernate-search-backend-elasticsearch-client-opensearch-rest` backed by `org.opensearch.client:opensearch-rest-client`
64+
5665
[[data-format]]
5766
== Data format and schema
5867

@@ -84,11 +93,12 @@ are backward-compatible with Hibernate Search {hibernateSearchPreviousStableVers
8493
The https://hibernate.org/community/compatibility-policy/#code-categorization[API]
8594
in Hibernate Search {hibernateSearchVersion}
8695
is, in general, backward-compatible with Hibernate Search {hibernateSearchPreviousStableVersionShort}.
87-
But, there are some deprecations:
96+
However, some elements are now deprecated:
8897

8998
* `org.hibernate.search.backend.elasticsearch.client.ElasticsearchHttpClientConfigurer` is deprecated for removal.
9099
With introduction of the pluggable Elasticsearch backend clients, configurers are a part of the particular client
91-
and expose client-specific configuration knobs.
100+
and expose client-specific configuration knobs. To keep using the Elasticsearch low level based REST client (Apache HTTP Client 4)
101+
switch to `org.hibernate.search.backend.elasticsearch.client.rest4.ElasticsearchHttpClientConfigurer`
92102
* `org.hibernate.search.backend.elasticsearch.client.ElasticsearchHttpClientConfigurationContext` is also up for removal,
93103
as it's a part of the configurer API.
94104

documentation/src/main/asciidoc/public/reference/_backend-elasticsearch.adoc

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,25 +163,50 @@ which needs to be enabled explicitly.
163163
== Client configuration
164164

165165
An Elasticsearch backend communicates with an Elasticsearch cluster through a REST client.
166-
Hibernate Search comes with a range of pluggable Elasticsearch REST clients that the user can pick from:
166+
Hibernate Search comes with a range of pluggable Elasticsearch REST clients that you can pick from.
167+
168+
Currently, the default one is the <<backend-elasticsearch-configuration-client-elasticsearch-client-rest4,`hibernate-search-backend-elasticsearch-client-rest4`>>,
169+
which may change in future versions of Hibernate Search.
170+
You should explicitly define the REST client in the application dependencies,
171+
if it matters which one the Elasticsearch backend will pick.
172+
173+
=== Available clients
167174

168175
[[backend-elasticsearch-configuration-client-elasticsearch-client-rest4]]
169-
`hibernate-search-backend-elasticsearch-client-rest4`::
170-
Description::: The Elasticsearch low level client based implementation (`org.elasticsearch.client:elasticsearch-rest-client`).
176+
==== Elasticsearch low level REST client (Apache HTTP Client 4)
177+
178+
Coordinates::
179+
GroupID::: `org.hibernate.search`
180+
ArtifactID::: `hibernate-search-backend-elasticsearch-client-rest4`
181+
Underlying HTTP Client::: Apache HTTP Client 4
182+
183+
This Elasticsearch backend REST client is based on the Elasticsearch low level client (`org.elasticsearch.client:elasticsearch-rest-client`).
171184
Currently, the default REST client used by the Elasticsearch backend.
172-
Underlying HTTP Client::: Apache HTTP Client 4
173185

174186
[[backend-elasticsearch-configuration-client-elasticsearch-client-rest5]]
175-
`hibernate-search-backend-elasticsearch-client-rest5`::
176-
Description::: The Elasticsearch Java client based implementation (`co.elastic.clients:elasticsearch-java`).
177-
Underlying HTTP Client::: Apache HTTP Client 5
187+
==== Elasticsearch low level REST client (Apache HTTP Client 5)
188+
189+
include::../components/_incubating-warning.adoc[]
190+
191+
Coordinates::
192+
GroupID::: `org.hibernate.search`
193+
ArtifactID::: `hibernate-search-backend-elasticsearch-client-rest5`
194+
Underlying HTTP Client::: Apache HTTP Client 5
195+
196+
This Elasticsearch backend REST client is based on the newer Elasticsearch low level client (`co.elastic.clients:elasticsearch-rest5-client`),
197+
which is also used in the `co.elastic.clients:elasticsearch-java`.
178198

179199
[[backend-elasticsearch-configuration-client-elasticsearch-client-opensearch]]
180-
`hibernate-search-backend-elasticsearch-client-opensearch`::
181-
Description::: The OpenSearch low level client based implementation (`org.opensearch.client:opensearch-rest-client`).
182-
Underlying HTTP Client::: Apache HTTP Client 5
200+
==== OpenSearch low level REST client (Apache HTTP Client 5)
201+
202+
include::../components/_incubating-warning.adoc[]
203+
204+
Coordinates::
205+
GroupID::: `org.hibernate.search`
206+
ArtifactID::: `hibernate-search-backend-elasticsearch-client-opensearch-rest`
207+
Underlying HTTP Client::: Apache HTTP Client 5
183208

184-
Below are the options that affect these clients.
209+
This Elasticsearch backend REST client is based on the OpenSearch low level client (`org.opensearch.client:opensearch-rest-client`).
185210

186211
[[backend-elasticsearch-configuration-hosts]]
187212
=== Target hosts

0 commit comments

Comments
 (0)