-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Migration Guide 1.3
You need to upgrade Maven to 3.6.2+ due to a bug in Maven resolver.
You need JUnit 5.6+. It's included in our BOM but if you specify the version manually, you need to ugprade.
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.
A few methods in the Search DSL have been renamed:
-
searchSession.search(...).predicate(...)
becomessearchSession.search(...).where(...)
. -
searchSession.search(...).asProjection(...)
becomessearchSession.search(...).select(...)
. -
searchSession.search(...).asProjections(...)
becomessearchSession.search(...).select(...)
. -
searchSession.search(...).asEntity(...)
becomessearchSession.search(...).selectEntity()
. -
searchSession.search(...).asEntityReference(...)
becomessearchSession.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.
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.
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.