Hibernate Search

Migration Guide from Hibernate Search 5.11 to 6.0

Here we are helping you migrate your existing Search application to the latest and greatest.

Upgrade to Hibernate Search 6.0.x from 5.11.x

The aim of this guide is to assist you migrating an existing application using any version 5.11.x of Hibernate Search to the latest of the 6.0.x series. If you’re looking to migrate different versions see Hibernate Search migration guides.

This document provides pointers for a migration. It refers to Hibernate Search version 6.0.0.Alpha1. If you think something is missing or something does not work, please contact us.

Requirements

This section is still incomplete. To be completed upon the CR or release.
  • The Elasticsearch backend now requires Elasticsearch 5.6 or 6.5.

  • The Lucene backend now requires Lucene 7.5.

Maven coordinates changes

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.
  • the group IDs changed from org.hibernate to org.hibernate.search

  • most of the artifact IDs changed to reflect the new mapper/backend design

  • the Lucene integration now requires an explicit dependency instead of being pulled by the engine by default.

Read the getting started guide, section "dependencies" for more information.

Configuration changes

This section is still incomplete. To be completed upon the CR or release.

One of the main changes is the addition of the concept of "backend" to the configuration. The "backend" represents a common set of resources shared between multiple index managers: thread pools if necessary, a filesystem directory where index files are stored (Lucene), a HTTP client to reach a remote indexing service (Elasticsearch), …​

You will have to define a named "backend" in your configuration, and set various backend-scoped properties such as the root index path (for local Lucene indexes) or the hosts (for Elasticsearch) instead of configuring these at the index level like in Search 5.

Read the getting started guide, section "configuration" for more information.

API changes

This section is still incomplete. To be completed upon the CR or release.

A lot of APIs changed. We recommend to have a look at the getting started guide before migrating.

SPI changes

This section is still incomplete. To be completed upon the CR or release.

Behavior changes

This section is still incomplete. To be completed upon the CR or release.
  • It is no longer possible to map multiple entity types to the same index. Each index must be mapped to exactly one entity type.

Back to top