You asked for it, we deliver: Hibernate Search 5.7.0.Final, with support for Hibernate ORM 5.2.8, is out! And of course, like previous versions, it features experimental support for Elasticsearch integration (even with some improvements).
Stuck on an older ORM version? Don’t worry, we also released a bugfix version for 5.6, namely 5.6.1.Final.
Hibernate Search 5.7.0.Final is only compatible with Hibernate ORM 5.2.3 and later. There isn’t any version of Hibernate Search compatible Hibernate ORM 5.2.0 to 5.2.2.
If you need to use Hibernate ORM 5.0.x or 5.1.x and cannot upgrade, please use Hibernate Search 5.6.1.Final.
Below are the main changes since the candidate release.
If you are looking for advice on how to migrate, please refer to the migration guide.
HSEARCH-2574: when it makes sense, you can now repeat Hibernate Search annotations on a single attribute/method. For example, if you want to add two index fields on the same
titleattribute, you can write:
@Field(analyzer = @Analyzer(definition = "myAnalyzer") @Field(name = "title_sort", analyzer = @Analyzer(definition = "myAnalyzerForSort") private String title;
Thus you don’t have to use the composite annotations (
@Fields) anymore. But of course, those are still available.
HSEARCH-2588: some methods in the Sort DSL allowed to specify the sort field type explicitly, which was useful when sorting on fields added through custom field bridges. We improved support for
MetadataProvidingFieldBridge, so that you now only need to implement this interface on your custom field bridges, and won’t need anything special when using the sort DSL anymore. As a result, the
andByField(String, SortField.Type)methods in the sort DSL have been deprecated.
HSEARCH-2587: an NPE could occur when using the Sort DSL to sort on embedded (
@IndexedEmbedded) fields; this is now fixed.
HSEARCH-2576: unnecessary memory allocations within queries have been removed, resulting in better query throughput.
HSEARCH-2453: Elasticsearch authentication is now fully implemented: there are dedicated
passwordproperties so that you don’t need to embed the credentials in the URL anymore.
HSEARCH-2593: when using automatic node discovery on Elasticsearch, a scheme (HTTP or HTTPS) cannot be detected automatically for newly discovered nodes; by default it is HTTP. You can now customize this to use HTTPS instead: just add
hibernate.search.default.elasticsearch.discovery.default_scheme httpsto your configuration.
HSEARCH-2590: queries using pagination could allocate too much memory in certain circumstances; this is now fixed.
5.6.1.Final contains exclusively backported fixes from 5.7. You can see a full list of changes since 5.6.0.Final in the release notes.
We’re now focusing on the next two big improvements:
streamlining our APIs, in particular to better fit remote indexing services (like Elasticsearch), but also to support Lucene 6. Due to the breaking changes this requires, we will include these changes in a new major release, Hibernate Search 6.0.
All versions are available on Hibernate Search’s web site.
Ideally use a tool to fetch it from Maven central; these are the coordinates:
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-orm</artifactId> <version>5.7.0.Final</version> </dependency>
To use the experimental Elasticsearch integration you’ll also need:
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-elasticsearch</artifactId> <version>5.7.0.Final</version> </dependency>
Downloads from Sourceforge are available as well.