Hibernate Search 中文操作指南

3. Migrating

如果你要将现有应用程序从旧版 Hibernate Search 升级到最新版本,请务必查看 migration guide

If you are upgrading an existing application from an earlier version of Hibernate Search to the latest release, make sure to check out the migration guide.

针对 Hibernate Search 5 用户

To Hibernate Search 5 users

如果您从 Maven 存储库中提取我们的 artifact,并且您来自 Hibernate Search 5,请注意,仅提升版本号是不够的。

If you pull our artifacts from a Maven repository, and you come from Hibernate Search 5, be aware that just bumping the version number will not be enough.

具体而言,组 ID 从 org.hibernate 更改为 org.hibernate.search ,大部分 artifact ID 更改为反映新的映射器/后端设计,并且 Lucene 集成现在需要显式依赖,而不是默认情况下可用。请阅读 Dependencies 以了解更多信息。

In particular, the group IDs changed from org.hibernate to org.hibernate.search, most of the artifact IDs changed to reflect the new mapper/backend design, and the Lucene integration now requires an explicit dependency instead of being available by default. Read Dependencies for more information.

另外,请注意很多 API 已经更改,其中一些仅因为包改变而更改,另一些则因为更基础的更改(例如从使用 Hibernate Search API 中的 Lucene 类型改为不使用)而更改。出于该原因,我们建议您先使用 6.0 migration guide 迁移到 Hibernate Search 6.0,然后迁移到更高版本(这将容易得多)。

Additionally, be aware that a lot of APIs have changed, some only because of a package change, others because of more fundamental changes (like moving away from using Lucene types in Hibernate Search APIs). For that reason, you are encouraged to migrate first to Hibernate Search 6.0 using the 6.0 migration guide, and only then to later versions (which will be significantly easier).