Skip to content

Migration Guide 1.3

Guillaume Smet edited this page Mar 7, 2020 · 19 revisions

Maven

You need to upgrade Maven to 3.6.2+ due to a bug in Maven resolver.

JUnit

You need JUnit 5.6+. It's included in our BOM but if you specify the version manually, you need to ugprade.

Native images and GraalVM

19.3.1 and 20.0.0 are supported. Older versions are not.

Both JDK 8 and JDK 11 should work but keep in mind that GraalVM JDK 11 is a tech preview.

Hibernate Search + Elasticsearch (Preview)

Search DSL

A few methods in the Search DSL have been renamed:

  • searchSession.search(...).predicate(...) becomes searchSession.search(...).where(...).
  • searchSession.search(...).asProjection(...) becomes searchSession.search(...).select(...).
  • searchSession.search(...).asProjections(...) becomes searchSession.search(...).select(...).
  • searchSession.search(...).asEntity(...) becomes searchSession.search(...).selectEntity().
  • searchSession.search(...).asEntityReference(...) becomes searchSession.search(...).selectEntityReference().

The methods with the old name are still present, though deprecated. They will be removed before Hibernate Search 6.0.0.Final is released.

Index layout

Elasticsearch indexes are now accessed through aliases only. Hibernate Search relies on two aliases for each index: one for writes (<myindex>-write) and one for reads (<myindex>-read).

As a result, you will need to either create the two aliases, or drop your indexes and have Hibernate Search re-create empty indexes on startup: it will create the aliases.

See this section of the reference documentation for more information about index layout.

Configuration

The names of synchronization strategies for automatic indexing have changed:

  • queued => async.
  • committed (the default) => write-sync (still the default).
  • searchable (commonly used for tests) => sync (still recommended for tests only).

So if your configuration looked like this:

quarkus.hibernate-search.automatic_indexing.synchronization.strategy = queued

You should now have this:

quarkus.hibernate-search.automatic_indexing.synchronization.strategy = async

And if it looked like this:

quarkus.hibernate-search.automatic_indexing.synchronization.strategy = searchable

You should now have this:

quarkus.hibernate-search.automatic_indexing.synchronization.strategy = sync

See this section of the reference documentation for more information about synchronization strategies.

Migration guides

Current version


LTS versions


Next version in main


Clone this wiki locally