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 6.1.0.CR1, the first release candidate of Hibernate Search 6.1.

Among the main changes since Beta2: better defaults and optional operators for the regexp predicate, additional Maven artifacts compatible with Hibernate ORM 6, and more.

What’s new

For a summary of all new features and improvements since 6.0, head to the dedicated page on hibernate.org.

Dependency upgrades

Hibernate ORM (HSEARCH-4436)

Hibernate Search 6.1 now depends on Hibernate ORM 5.6.3.

Others
  • HSEARCH-4446: Upgrade to Elasticsearch client 7.16.3

  • HSEARCH-4448: Upgrade to JBoss logging 3.4.3.Final

  • HSEARCH-4449: Upgrade to slf4j 1.7.33 (only affects artifacts related to the AWS integration)

Better defaults and optional operators for the regexp predicate

The regexp predicate, introduced in Hibernate Search 6.1, now allows selecting optional operators explicitly using flags (HSEARCH-4362).

These operators are no longer enabled by default, which should avoid problems such as the regexp .*@jboss.org matching something@lists.jboss.org because @ is an optional operator matching any string…​

For more information about optional operators, head to this section of the reference documentation.

Hibernate ORM 6

Thanks to HSEARCH-3277, beside the traditional artifacts targeting Java EE (JPA, CDI, …​) and Hibernate ORM 5.x, Hibernate Search now provides alternative, experimental artifacts that target Hibernate ORM 6.0.0.Beta3 and Jakarta EE 9.1 (Jakarta Persistence 3, Jakarta CDI 3).

These artifacts have their artifact ID suffixed with "-orm6".

In Hibernate Search 6.1.0.CR1, this includes the following ORM 6 artifacts:

  • org.hibernate.search:hibernate-search-mapper-orm-orm6:6.1.0.Beta1

  • org.hibernate.search:hibernate-search-mapper-orm-coordination-outbox-polling-orm6:6.1.0.Beta1

  • org.hibernate.search:hibernate-search-mapper-orm-batch-jsr352-core-orm6:6.1.0.Beta1

  • org.hibernate.search:hibernate-search-mapper-orm-batch-jsr352-jberet-orm6:6.1.0.Beta1

  • org.hibernate.search:hibernate-search-v5migrationhelper-orm-orm6:6.1.0.Beta1

Note that in order to switch to Hibernate ORM 6 and Jakarta EE, you will need to switch to these artifacts, but also:

  • Use Hibernate ORM 6 instead of 5.x; this involves changing the group ID for Hibernate ORM artifacts, not just the version: org.hibernate becomes org.hibernate.orm.

  • Use Jakarta EE-specific artifacts for your other Java EE dependencies.

  • Convert your code to Jakarta EE APIs. This should be rather straightforward: simply replace import javax.persistence.<something> with import jakarta.persistence.<something> everywhere in your code (same with javax.enterprise, javax.transaction, etc.).

  • Find a new version of your framework or application server that supports Jakarta EE. This might be hard to come by, as Jakarta EE is still young, but some application servers already provide at least a preview.

Breaking changes

Other improvements and bug fixes

  • HSEARCH-4425: Mark non-nullable properties as such in OutboxPollingOutboxEventAdditionalJaxbMappingProducer

  • HSEARCH-4443: Enum properties in outbox-polling entities (agent, outboxevent) have a weird type in database

  • HSEARCH-4438: More detailed error message for syntax errors in custom mapping/settings file

And more. For a full list of changes since the previous releases, please see the release notes.

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 6.1 is a drop-in replacement for 6.0, 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