Hibernate Search is a library that integrates Hibernate ORM with Apache Lucene or Elasticsearch by automatically indexing entities, enabling advanced search functionality: full-text, geospatial, aggregations and more. For more information, see Hibernate Search on hibernate.org.

We just published Hibernate Search 7.2.0.Alpha2, the second alpha release of the next minor version of Hibernate Search.

Compared to the previous alpha, this version contains the license change, predicate improvements and more.

It also upgrades Lucene and Hibernate ORM dependencies and includes compatibility with the latest Elasticsearch 8.14.

Switch project license to Apache License 2.0

We are pleased to announce that Hibernate Search 7.2.0.Alpha2 is licensed under Apache License 2.0, which will be the license for all releases of Hibernate Search in the 7.2 series and later. This change is a part of a broader initiative to re-license Hibernate projects with the Apache License 2.0.

What’s new

Hibernate Search 7.2 is still in its early stages of development: some features are still incomplete or may change in a backwards-incompatible way.

Dependency upgrades

Hibernate ORM (HSEARCH-5154)

Hibernate Search now depends on Hibernate ORM 6.5.2.Final.

Lucene (HSEARCH-5166)

The Lucene backend now uses Lucene 9.11.0.

Elasticsearch (HSEARCH-5164)

The Elasticsearch backend works with Elasticsearch 8.14, as well as other versions that were already compatible.


within/withinAny for the range predicate

The range predicate can now accept multiple ranges, matching the document when the value is within at least one of the provided ranges.

List<Book> hits = searchSession.search( Book.class )
        .where( f -> f.range().field( "pageCount" )
                        Range.between( 200, 250 ),
                        Range.between( 500, 800 )
                ) )
        .fetchHits( 20 );

Other improvements and bug fixes

  • HSEARCH-5161: Prevent mass indexer from dropping the schema on start when requested but multitenancy is configured.

  • HSEARCH-5162: Ensure that Hibernate Search works correctly when Hibernate ORM’s JPA compliance is enabled (hibernate.jpa.compliance.query=true).

  • HSEARCH-5107/HSEARCH-5108: Close Lucene index readers sooner.

And more. Please see the release notes for a complete list of changes since the previous releases.

How to get this release

All details are available and up to date on the dedicated page on hibernate.org.

Getting started, migrating

For new applications, refer to the getting started guide:

For existing applications, Hibernate Search 7.2 is a drop-in replacement for 7.1, assuming you also upgrade the dependencies. Information about deprecated configuration and API is included in the migration guide.

Feedback, issues, ideas?

To get in touch, use the following channels:

Back to top