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.

The Hibernate Search team is very happy to release Hibernate Search 4. This has been a long and huge effort from our side and we can't wait for you to get your hands on it. This release is coming right in sync with Hibernate Core 4 Final. We made sure both work perfectly together.

There are too many new features to list them all. Let me give you the executive summary:

  • support for Hibernate Core 4
  • support for source of data/events other than Hibernate Core (which is now an optional dependency)
  • clearer split between APIs, SPIs and implementation classes
  • better log and error reporting
  • better underlying architecture - index managers allow now for one backend per index and even non directory based indexes
  • near real time search
  • optimized and cross-version compatible wire format for communications between master and slaves
  • performance improvements (more analyzer parallelization, fine-grained masters etc)
  • support for projections on custom bridges fields
  • support for @IndexedEmbedded on collections of basic types
  • easier way to work on documentation translation

Ground work

We have done a lot of ground work. Hibernate Search 4 targets Hibernate Core 4 and uses its nice integrator concept. Our code is now properly split into APIs, SPIs and implementation classes. If you import a class contained in a impl package, you know that this code is not guaranteed to work between micro versions.

To help our work in Infinispan, Hibernate Search is now truely independent of Hibernate Core - it's an optional dependency. We have also improved error messages and logs which now come with a unique identifier like HSEARCH00024. The idea is to support internationalization and let you easily Google for an error and find posts describing the same problem.

Architecture and indexing work

We have reworked our underlying architecture to give you more flexibility and prepare for our work in Hibernate OGM. Each index now has its own backend configuration (using JMS or direct Lucene directories, syn/async etc). This also helps us index things more efficiently and in parallel. Another nice consequence is that you technically can have one master per index (in the master/slaves model) instead of one master for all indexed. This will help scalability in high pressure scenarios.

We now also support non-directory based index managers which enabled us to implement near real time search (sometimes called NRT search). Near real time search comes with a few gotchas, but can be very useful. Read more about near real time search.

To help support clusters of heterogeneous versions, we have rewritten the wire protocol used to communicate between slaves and masters. We use Avro as the serialization library which gives us the required abstraction. A nice side effect is a much smaller payload and speed improvements over the old java serialization approach.


We have worked on many other things. Check out the release notes in the distribution for the full list of changes. Oh and of course it works in JBoss AS 7.

Another one I'd like to mention is the much easier process to translate the documentation to foreign languages. It's all on the web :) If you feel like translating the doc, read more about the translation process.

Get the release

Make sure to read the migration guide if you convert an existing application. And go download Hibernate Search 4.

Many thanks to all the contributors that made this release possible whether it be via pull requests, bug reports or feedback on the forum.

Enjoy and happy holidays to everyone.

Back to top