We just published Hibernate Search 6.0.0.Alpha9, a new release of the still-in-development 6.0 branch. This release mainly introduces correct handling of session flushing and clearing, restores support for static sharding and upgrades to Elasticsearch 7.3, Lucene 8.2 and Hibernate ORM 5.4.4.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.
Hibernate Search 6 is still in development and its APIs differ significantly from Search 5.
For more information about the current status of this branch, see the page dedicated to Search 6 on hibernate.org.
For more information about migration and what we intend to do to help you, see the migration guide.
It is now possible to transparently implement batch processing with a periodic
calls to Hibernate Search APIs such as
fullTextSession.flushToIndexes()are no longer necessary;
entities removed from the session in the
clearwill no longer lead to a
every document created in a transaction containing a loop with a periodic
clearwill correctly be indexed on transaction commit (and not in the middle of the transaction).
Note that Hibernate Search still needs to store the documents in memory until they are indexed on transaction commit, which may be more than what your JVM heap can handle, depending on the number and complexity of your documents. Several solutions to this problems are included in the section of the documentation about explicit indexing.
Support for static sharding has been restored as of HSEARCH-3314. It is now possible to leverage routing keys with Elasticsearch, and to split a Lucene index into several (statically defined) shards.
See the section of the documentation about sharding for more information.
As of HSEARCH-3642,
ProjectionConverter enums used in the search DSL
have been replaced with a single enum,
Hibernate Search 6 now requires ORM 5.4.4.Final or later to work correctly. Earlier 5.4.x versions will not work correctly.
This is caused by a change (HSEARCH-3447) that was necessary to avoid the deprecated native criteria APIs that may be removed in ORM 6 .
HSEARCH-3612: Patterns are now consistently normalized in wildcard/prefix predicates.
HSEARCH-3062: It is now possible to project on single-valued fields within nested object fields.
HSEARCH-3551: Hibernate Search will now boot correctly when declared as a dependency in a
HSEARCH-3068: Hibernate Search 6 will now correctly trigger indexing on flush when performing entity changes outside of a transaction (not recommended).
HSEARCH-3643: Entities will now be unproxied before attempting to extract field values when indexing. Thanks to Alexis Cucumel for bringing this bug to our attention.
HSEARCH-899: Uses of
@IndexedEmbeddedon types that are not mapped in any way (no
@GenericField, no custom bridge, …) will now trigger a bootstrap failure.
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.