Hibernate Search

5.6 series stable

Introduces experimental support for Elasticsearch, last release supporting Hibernate ORM 5.0.z or 5.1.z

Compatibility

Java 7+
Hibernate ORM 5.0 - 5.1
Elasticsearch 2.0 - 2.4
Apache Lucene 5.5

Not compatible with your requirements? Have a look at the other series.

Documentation

Documentation for this specific series can be accessed through the links below:

HTML PDF API (JavaDoc)

You can find more documentation for all series on the documentation page.

How to get it

Maven, Gradle...

Maven artifacts of Hibernate Search are published to Maven Central and to the JBoss Maven Repository. Refer to the Maven Getting Started guide on the Jboss Wiki for more information on how to configure Maven.

Below are the Maven coordinates of the main artifacts.

org.hibernate:hibernate-search-orm:5.6.4.Final
Hibernate ORM integration
org.hibernate:hibernate-search-elasticsearch:5.6.4.Final
Elasticsearch integration
org.hibernate:hibernate-search-backend-jgroups:5.6.4.Final
JGroups backend
org.hibernate:hibernate-search-backend-jms:5.6.4.Final
JMS backend

Zip archive

Direct download is available from SourceForge:

Download Zip archive

More information about specific releases (announcements, download links) can be found here.

What's new

Latest release announcement (2017-10-26): 5.6.4.Final.

A detailed list of new features, improvements and fixes in this series can be found on our JIRA instance.

Experimental Elasticsearch integration

A new, experimental Elasticsearch integration was introduced in this series.

With the Elasticsearch integration, rather than indexing your entities directly by managing the Lucene resources, Hibernate Search will be sending RPCs to an Elasticsearch cluster to achieve a very similar purpose: after all it is also Lucene based, so the feature match is extremely close!

Since Hibernate Search will transparently map all the current features to this new alternative backend, you will be able to switch to a new architecture with only minimal changes in your applications. For most users the differences will be mostly in configuration details.

When using Elasticsearch, Hibernate Search will need to send RPCs over the network to run queries and index updates, but on the other hand you benefit from Microservices - style decoupling and all the nice features that Elasticsearch can provide in terms of running and managing an horizontally scalable cluster.

To know more about this integration, check out the Elasticsearch chapter in the documentation.

Sort DSL

The QueryBuilder interface now has an additional sort() method, allowing to easily build sort definitions regardless of the underlying technology (raw Lucene or Elasticsearch), and without worrying about numeric field types:

QueryBuilder builder = fullTextSession.getSearchFactory()
  .buildQueryBuilder().forEntity(Book.class).get();
Query luceneQuery = builder.all().createQuery();
FullTextQuery query = fullTextSession.createFullTextQuery( luceneQuery, Book.class );
Sort sort = builder
  .sort()
    .byField("author").desc() // Descending order
    .andByField("title") // Default order (ascending)
  .createSort();
query.setSort(sort);
List results = query.list();

You can find more information in this blog post and in the documentation

Lucene upgrade

The Lucene dependency was upgraded to 5.5.

Also, do not think Lucene was forgotten in this series, since there were several bug fixes and performance improvements. See the release notes for details.

Async reader strategy

A new async reader strategy has been added for the Lucene integration, bringing performance boosts when you are okay with your queries being run on an out-of-date index (how much out-of-date is configurable).

Refer to the documentation for more information.

Migrate

If you need to upgrade from a previous series, please refer to the migration guide.

Releases in this series

Back to top