We just published Hibernate Search 6.0.0.Alpha7, a new release of the still-in-development 6.0 branch. This release mainly restores missing parameters for index field types, restores explicit indexing APIs, and upgrades to Elasticsearch 6.8 and 7.1.
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.
HSEARCH-3048 added support
termVectors field type parameters,
bringing Search 6 on par with Search 5.
See this section of the documentation for a description of all available field type parameters.
HSEARCH-3049 introduced APIs for explicit writes to indexes, as an alternative or complement to automatic indexing.
The APIs are different from Search 5, but provide similar features.
See the "Explicit indexing" section of the documentation for more information.
Search.getSearchSession(Session)was renamed to
Search.session(Session). The old method is still available, but will be removed soon.
SearchQueryContext#sortnow expects a
Functionparameter instead of a
by(SearchSort)method was removed from the sort DSL.
HSEARCH-3604: The concept of "reference projection" has been renamed to "entity reference projection": in the search DSL,
entityReference(). Search queries returning references to entities now use the
org.hibernate.search.mapper.orm.common.EntityReferencetype instead of
HSEARCH-3605: Some API types related to bridges, container extractors and annotation-based entity mapping have been moved for the sake of consistency.
MarkerMapping#builderwas renamed to
The documentation continues to grow:
MassIndexer.start()now returns a
CompletableFutureinstead of a
@DocumentIdnow works correctly on properties that are not the entity ID.
HSEARCH-3254: When building a field sort,
.onMissingValue().use()now works properly for string fields with the Lucene backend.
HSEARCH-3255: When building a field sort,
.onMissingValue().use()now works properly for date/time fields with the Elasticsearch backend.
HSEARCH-3616: When building a "match id" predicate, the
matchingAny()now expects a
HSEARCH-3618: Distance projection will no longer lead to missing hits.
SearchProjectioncan now safely be cached and reused from one scope instance to another: Hibernate Search will check that they are compatible with the new scope.
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.