We just published a second candidate release for Hibernate Search 6.0: version 6.0.0.CR2.
This release mainly brings a workaround for applications hanging on startup with Spring Boot 2.3+, type parameters for type bridges and property bridges, and an alternative, URI-based configuration for target Elasticsearch hosts.
It also includes an upgrade to Lucene 8.7.0, Elasticsearch 7.10.0 and Hibernate ORM 5.4.24.Final.
If you want to dive right into the new, shiny Hibernate Search 6, a good starting point is the getting started guide included in the reference documentation.
If you want to migrate an application based on Hibernate Search 5, be aware that Hibernate Search 6 APIs differ significantly from Hibernate Search 5. We recommend you have a look at see the migration guide.
While this version has been tested extensively, and we don’t anticipate any particular problem, the goal of this candidate release is to catch as many bugs as possible before the final release.
If you happen to encounter problems, please contact us:
For an overview of new features and improvements in Hibernate Search 6, see here.
A bug in Spring may cause your application to hang on bootstrap if it relies on custom beans, unless you add specific configuration. This affects Spring Boot 2.3.0 and above.
As of HSEARCH-4096, Hibernate Search will only look for Spring beans when it cannot resolve a bean reference to a built-in bean. This means that an application that does not rely on custom beans will not be affected by Spring’s hang-on-startup bug.
Additionally, bean references in configuration properties
can now use a prefix in order to specify how the bean is to be retrieved.
A bean reference such as
constructor:com.mycompany.MyBean, for example,
will always bypass Spring and use reflection to instantiate the bean,
thereby avoiding Spring’s hang-on-startup bug.
The bean won’t be able to rely on
@Autowired or other Spring features, however.
If you really need to use Spring beans in Hibernate Search components,
until the Spring project resolves this deadlock, the best workaround is to set the property
As of HSEARCH-4088,
TypeBridge is now
PropertyBridge is now
The new type parameter represents the expected type of bridged elements.
It allows for easier detection of incorrectly applied bridges.
See the updated documentation for more information.
Existing bridges implementing the raw
PropertyBridge types will continue to work without any change.
As of HSEARCH-4099, the target Elasticsearch cluster can alternatively be configured using URIs, for example:
hibernate.search.backend.uris = https://es1.mycompany.com:9200,https://es2.mycompany.com:9200
The host-based configuration can still be used, but not at the same time as URI-based configuration:
hibernate.search.backend.hosts = es1.mycompany.com:9200,es2.mycompany.com:9200 hibernate.search.backend.protocol = https
Hibernate Search 6 requires ORM 5.4.4.Final or later to work correctly. Earlier 5.4.x versions will lead to potentially cryptic runtime exceptions.
HSEARCH-4096: Bean references in configuration properties (e.g. for an analysis configurer) are now parsed. Attempting to reference a bean whose name contains a colon (e.g.
my.company:analysis:configurer) will lead to an exception on bootstrap. To work around that, prefix the bean name with the bean resolution mode, for example
bean:my.company:analysis:configurer. See here for more information.
HSEARCH-4100: Queries and requests are now logged at the
HSEARCH-4101: The default required status for Elasticsearch indexes is now
HSEARCH-4067: Configuration examples no longer include confusing comments (such as
HSEARCH-4074: It should be clearer which type of bridge to chose, depending on the use case.
HSEARCH-4094: The documentation of the JSR-352 integration now clearly mentions that an additional dependency is necessary.
HSEARCH-4113: Documented a limitation regarding the serialization of an ORM
SearchResult.took()is now more accurate with the Lucene backend.
HSEARCH-4107: With Spring Boot 2.4+, the methods
Search.getFullTextSession(…)of the Search 5 migration helper will no longer throw a
Search.session(…)can now be used from multiple threads if the
Sessionis thread-safe. Typically, that’s the case for an
Sessioninjected by CDI or Spring into a transactional bean.
HSEARCH-4112: Hibernate Search will no longer fail to index entities when using Spring with JTA enabled.
HSEARCH-4116: Empty, blank or null configuration properties will now be ignored when detecting unused properties.
And more. For a full list of changes since the previous releases, please see the release notes.
All details are available and up to date on the dedicated page on hibernate.org.