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.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.

Getting started with Hibernate Search 6

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.

What’s new

All Hibernate Search 5 field type parameters are implemented

HSEARCH-3048 added support for the searchable, norms and 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.

Explicit index write APIs are back

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.

Backward-incompatible API changes

  • HSEARCH-3610: Search.getSearchSession(Session) was renamed to Search.session(Session). The old method is still available, but will be removed soon.

  • HSEARCH-3591: SearchQueryContext#sort now expects a Function parameter instead of a Consumer.

  • HSEARCH-3617: The 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, asReference() became asEntityReference() and reference() became entityReference(). Search queries returning references to entities now use the org.hibernate.search.mapper.orm.common.EntityReference type instead of PojoReference.

  • HSEARCH-3605: Some API types related to bridges, container extractors and annotation-based entity mapping have been moved for the sake of consistency.

  • HSEARCH-3587: MarkerMapping#builder was renamed to MarkerMapping#marker.

Documentation

The documentation continues to grow:

  • There is javadoc on all APIs (HSEARCH-3367).

  • Every available predicate, sort and projection is referenced and has at least one example in the documentation.

  • Newly reintroduced features such as the write APIs are being documented progressively.

Version upgrades

Other improvements and bug fixes

  • HSEARCH-2539: MassIndexer.start() now returns a CompletableFuture instead of a Future.

  • HSEARCH-3203: @DocumentId now 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 Collection<?> instead of Collection<Object>.

  • HSEARCH-3618: Distance projection will no longer lead to missing hits.

  • HSEARCH-3192: SearchPredicate, SearchSort and SearchProjection can 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.

How to get this release

All details are available and up to date on the dedicated page on hibernate.org.

Feedback, issues, ideas?

To get in touch, use the following channels:


Back to top