@@ -39,8 +39,35 @@ https://hibernate.org/search/releases/#compatibility-matrix[compatibility matrix
39
39
The https://hibernate.org/community/compatibility-policy/[compatibility policy] may also be of interest.
40
40
====
41
41
42
- [TIP]
42
+ [NOTE]
43
+ .Elasticsearch licensing
43
44
====
45
+ While Elasticsearch up to 7.10 was distributed under the Apache License 2.0,
46
+ be aware that Elasticsearch 7.11-8.15 versions are distributed under the Elastic License and the SSPL,
47
+ which are https://opensource.org/node/1099[not considered open-source by the Open Source Initiative].
48
+ Starting with Elasticsearch 8.16 the AGPL v3 license was added.
49
+ Please refer to https://www.elastic.co/ to learn more on the licensing of Elasticsearch.
50
+
51
+ Only the low-level Java REST client, which Hibernate Search depends on, remains open-source.
52
+ ====
53
+
54
+ [NOTE]
55
+ .OpenSearch
56
+ ====
57
+ While it historically targeted link:{elasticsearchUrl}[Elastic's Elasticsearch distribution],
58
+ Hibernate Search is also compatible with link:{openSearchUrl}[OpenSearch] and regularly tested against it;
59
+ see <<backend-elasticsearch-compatibility>> for more information.
60
+
61
+ Every section of this documentation referring to Elasticsearch
62
+ is also relevant for the OpenSearch distribution.
63
+ ====
64
+
65
+ [[compatibility-search-dependencies]]
66
+ === Adding Hibernate Search dependencies to your project
67
+
68
+ [[compatibility-search-dependencies-bom]]
69
+ ==== Hibernate Search BOM
70
+
44
71
If you get Hibernate Search from Maven, it is recommended to import Hibernate Search BOM
45
72
as part of your dependency management to keep all its artifact versions aligned:
46
73
[source, XML, subs="+attributes"]
@@ -62,30 +89,69 @@ as part of your dependency management to keep all its artifact versions aligned:
62
89
</dependencies>
63
90
</dependencyManagement>
64
91
----
65
- ====
66
92
67
- [NOTE]
68
- .Elasticsearch licensing
69
- ====
70
- While Elasticsearch up to 7.10 was distributed under the Apache License 2.0,
71
- be aware that Elasticsearch 7.11-8.15 versions are distributed under the Elastic License and the SSPL,
72
- which are https://opensource.org/node/1099[not considered open-source by the Open Source Initiative].
73
- Starting with Elasticsearch 8.16 the AGPL v3 license was added.
74
- Please refer to https://www.elastic.co/ to learn more on the licensing of Elasticsearch.
93
+ [[compatibility-search-dependencies-platform]]
94
+ ==== Hibernate Search Platform
75
95
76
- Only the low-level Java REST client, which Hibernate Search depends on, remains open-source.
77
- ====
96
+ include::../components/_incubating-warning.adoc[]
78
97
79
- [NOTE]
80
- .OpenSearch
81
- ====
82
- While it historically targeted link:{elasticsearchUrl}[Elastic's Elasticsearch distribution],
83
- Hibernate Search is also compatible with link:{openSearchUrl}[OpenSearch] and regularly tested against it;
84
- see <<backend-elasticsearch-compatibility>> for more information.
98
+ Besides the lean BOM file, Hibernate Search also provides several platform POM files that mange
99
+ dependencies that are not directly used by Hibernate Search but are related.
100
+ For example, it brings the management of all other `org.hibernate.orm` artifacts,
101
+ beyond the ones required by the <<mapper-orm,ORM mapper>>, or extra Lucene artifacts like
102
+ `lucene-suggest` or `lucene-analysis-icu` and others, that can be helpful for more advanced applications.
103
+ These platform files will help keep the versions of extra Hibernate ORM/Lucene/Elasticsearch client dependencies
104
+ aligned with the versions of artifacts from the same groups that are used by Hibernate Search itself.
85
105
86
- Every section of this documentation referring to Elasticsearch
87
- is also relevant for the OpenSearch distribution.
88
- ====
106
+ Currently, there are two platform POM files provided, to account for the <<other-integrations-lucene-next>> backend:
107
+
108
+ * `hibernate-search-platform` that manages versions of published artifacts that belong to the following group ids:
109
+ - `org.hibernate.search` for the {hibernateSearchVersion} version of Hibernate Search;
110
+ - `org.hibernate.orm` for the {hibernateVersion} version of Hibernate ORM;
111
+ - `org.apache.lucene` for the {luceneVersion} version of Lucene;
112
+ - `org.elasticsearch.client` for the {elasticsearchClientVersions} version of the Elasticsearch client;
113
+ * `hibernate-search-platform-next` that manages versions of published artifacts that belong to the following group ids:
114
+ - `org.hibernate.search` for the {hibernateSearchVersion} version of Hibernate Search;
115
+ - `org.hibernate.orm` for the {hibernateVersion} version of Hibernate ORM;
116
+ - `org.apache.lucene` for the {luceneNextVersion} version of Lucene;
117
+ - `org.elasticsearch.client` for the {elasticsearchClientVersions} version of the Elasticsearch client;
118
+
119
+ To leverage the dependency management provided by these platform files, use the same approach of importing as for
120
+ the <<compatibility-search-dependencies-bom,regular BOM>> file:
121
+
122
+ .Importing the Hibernate Search platform
123
+ [source, XML, subs="+attributes"]
124
+ ----
125
+ <dependencyManagement>
126
+ <dependencies>
127
+ <!--
128
+ Import Hibernate Search platform
129
+ to get all of its artifact versions aligned:
130
+ -->
131
+ <dependency>
132
+ <groupId>org.hibernate.search</groupId>
133
+ <artifactId>hibernate-search-platform</artifactId>
134
+ <version>{hibernateSearchVersion}</version>
135
+ <type>pom</type>
136
+ <scope>import</scope>
137
+ </dependency>
138
+ <!-- Any other dependency management entries -->
139
+ </dependencies>
140
+ </dependencyManagement>
141
+
142
+ <dependencies>
143
+ <!-- Any other dependency management entries -->
144
+ <!--
145
+ For example, add an extra Lucene dependency without specifying the version
146
+ as it is managed by the platform POM:
147
+ -->
148
+ <dependency>
149
+ <groupId>org.apache.lucene</groupId>
150
+ <artifactId>lucene-suggest</artifactId>
151
+ </dependency>
152
+ <!-- Any other dependency management entries -->
153
+ </dependencies>
154
+ ----
89
155
90
156
[[compatibility-framework]]
91
157
== [[gettingstarted-framework]] Framework support
@@ -183,7 +249,7 @@ or by explicitly listing a dependency with its version that we want to be used:
183
249
<dependency>
184
250
<groupId>org.hibernate.orm</groupId>
185
251
<artifactId>hibernate-platform</artifactId>
186
- <version>${version.org.hibernate.orm }</version>
252
+ <version>{hibernateVersion }</version>
187
253
<type>pom</type>
188
254
<scope>import</scope>
189
255
</dependency>
0 commit comments